tianyun %!s(int64=3) %!d(string=hai) anos
pai
achega
e95b86b4d2
Modificáronse 2 ficheiros con 11 adicións e 9 borrados
  1. 6 0
      simple-demo/index.html
  2. 5 9
      simple-demo/js/util.js

+ 6 - 0
simple-demo/index.html

@@ -142,6 +142,12 @@
             // this.queryList();
         },
         methods: {
+            modelShow() {
+                $('#exampleModalCenter').modal('show');
+            },
+            modelHide() {
+                $('#exampleModalCenter').modal('hide');
+            },
             refresh_pagination: function () {
                 $('#pageDiv').pagination({
                     pages: this.totalPage,  // 页数

+ 5 - 9
simple-demo/js/util.js

@@ -1,13 +1,9 @@
+function lt(obj) {
+    console.table(JSON.parse(JSON.stringify(obj)));
+}
+
 function deepClone(obj) {
-    let newObj = Array.isArray(obj) ? [] : {}
-    if (obj && typeof obj === "object") {
-        for (let key in obj) {
-            if (obj.hasOwnProperty(key)) {
-                newObj[key] = (obj && typeof obj[key] === 'object') ? deepClone(obj[key]) : obj[key];
-            }
-        }
-    }
-    return newObj
+    return JSON.parse(JSON.stringify(obj))
 }
 
 const app = {