Procházet zdrojové kódy

分屏卷帘标题问题修改

maxiaoxiao před 11 měsíci
rodič
revize
27e13e9e66

+ 5 - 4
src/components/sceneAtttribute/splitScreen/rollerScreen.vue

@@ -48,10 +48,11 @@ export default {
     },
   },
   watch: {
-    type() {
-      this.layers = Array(2);
-      this.checkedKeys = Array(2);
-      this.toolTitle = Array(2);
+    type(val) {
+      let length = val == 0 ? 0 : 2;
+      this.layers = Array(length);
+      this.checkedKeys = Array(length);
+      this.toolTitle = Array(length);
       this.setCheckeds();
     },
   },

+ 3 - 1
src/components/sceneAtttribute/splitScreen/splitScreen.vue

@@ -58,15 +58,17 @@ export default {
         case "QUAD":
           return 4;
         default:
-          break;
+          return 0;
       }
     },
   },
   watch: {
     value(val) {
       this.layers = Array(val);
+
       this.checkedKeys = Array(val);
       this.toolTitle = Array(val);
+      console.log(this.toolTitle, val, "----");
       this.setCheckeds();
     },
   },