d0cdc4c4 by 刘远

s

1 parent 8a00988d
...@@ -51,30 +51,4 @@ export default { ...@@ -51,30 +51,4 @@ export default {
51 } 51 }
52 return newArr; 52 return newArr;
53 }, 53 },
54 /**
55 * @brief:深度拷贝
56 * @param {*} data => obj
57 * */
58 deepClone: function (data) {
59 var type = this.getType(data);
60 var obj;
61 if (type === 'array') {
62 obj = [];
63 } else if (type === 'object') {
64 obj = {};
65 } else {
66 //不再具有下一层次
67 return data;
68 }
69 if (type === 'array') {
70 for (var i = 0, len = data.length; i < len; i++) {
71 obj.push(this.deepClone(data[i]));
72 }
73 } else if (type === 'object') {
74 for (var key in data) {
75 obj[key] = this.deepClone(data[key]);
76 }
77 }
78 return obj;
79 },
80 } 54 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
13 return { 13 return {
14 14
15 } 15 }
16 },
17 mounted() {
18 // let aa = this.commons.dateZhuan('yyyy-MM-dd', new Date());
16 } 19 }
17 } 20 }
18 </script> 21 </script>
...\ No newline at end of file ...\ No newline at end of file
......