Browse Source

修改项目提交

zhangwf 5 năm trước cách đây
mục cha
commit
b380ce6cd1
4 tập tin đã thay đổi với 1027 bổ sung937 xóa
  1. 9 24
      package-lock.json
  2. BIN
      src/assets/images/close-icon.png
  3. 18 20
      src/components/EditPanel.vue
  4. 1000 893
      src/views/h5editor/index.vue

+ 9 - 24
package-lock.json

@@ -1569,7 +1569,6 @@
       "version": "2.10.1",
       "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
       "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
-      "optional": true,
       "requires": {
         "hoek": "2.x.x"
       }
@@ -4829,8 +4828,7 @@
         "ansi-regex": {
           "version": "2.1.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -4873,8 +4871,7 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "concat-map": {
           "version": "0.0.1",
@@ -4885,8 +4882,7 @@
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -5003,8 +4999,7 @@
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "ini": {
           "version": "1.3.5",
@@ -5016,7 +5011,6 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -5046,7 +5040,6 @@
           "version": "2.2.4",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.1",
             "yallist": "^3.0.0"
@@ -5065,7 +5058,6 @@
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -5146,8 +5138,7 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -5159,7 +5150,6 @@
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -5245,8 +5235,7 @@
         "safe-buffer": {
           "version": "5.1.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -5282,7 +5271,6 @@
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -5302,7 +5290,6 @@
           "version": "3.0.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -5346,14 +5333,12 @@
         "wrappy": {
           "version": "1.0.2",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "yallist": {
           "version": "3.0.2",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         }
       }
     },
@@ -9406,7 +9391,7 @@
     },
     "normalize-wheel": {
       "version": "1.0.1",
-      "resolved": "http://r.cnpmjs.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
       "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
     },
     "normalize.css": {

BIN
src/assets/images/close-icon.png


+ 18 - 20
src/components/EditPanel.vue

@@ -62,7 +62,7 @@
             cursor: pointer; width:108px; position: relative;
             margin-bottom: 12px;
               height:28px;">
-              <div style="width:108px;
+              <div @click="showSelectedPicOrUnSelectedPic" style="width:108px;
               height:28px;
               background:rgba(78,93,255,1);
               border-radius:14px;font-size:14px;
@@ -72,8 +72,8 @@
               justify-content: center;
               line-height:28px;">替换元素
               </div>
-              <input style="display: none;position: absolute;top: 0px;" type="file" @change="fileChange"
-                multiple="false">
+              <!-- <input style="display: none;position: absolute;top: 0px;" type="file" @change="fileChange"
+                multiple="false"> -->
             </label>
           </div>
         </div>
@@ -718,6 +718,9 @@
       },
       panelState: {
         type: Number
+      },
+      showSelectedPicOrUnSelectedPic:{
+        type: Function
       }
     },
     data() {
@@ -876,23 +879,19 @@
           return false;
         }
         var ele = {};
-        if (this.element.children) {//如果有子元素需要深拷贝
-          var children = []
-          for (var i in this.element) {
-            if (i == 'children') {
-              this.element[i].forEach(function (child, index) {
-                var obj = {}
-                for (var k in child) {
-                  obj[k] = child[k]
-                }
-                children.push(obj)
-              })
-            } else {
-              ele[i] = this.element[i];
-            }
+        for (var i in this.element) {
+          if (i == 'children') {//如果有子元素需要深拷贝
+            var children = [];
+            this.element[i].forEach(function (child, index) {
+              var obj = {}
+              for (var k in child) {
+                obj[k] = child[k]
+              }
+              children.push(obj)
+            })
+          } else {
+            ele[i] = this.element[i];
           }
-        } else {
-          ele[i] = this.element[i];
         }
         ele.children = children || [];
         ele.nodeId = 'Id' + Math.random();
@@ -1111,7 +1110,6 @@
 
 </script>
 <style>
-  
   .fontSelect:nth-child(1) span {
     color: #000;
   }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1000 - 893
src/views/h5editor/index.vue