소스 검색

分屏卷帘标题问题修改

maxiaoxiao 11 달 전
부모
커밋
27e13e9e66
2개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 4
      src/components/sceneAtttribute/splitScreen/rollerScreen.vue
  2. 3 1
      src/components/sceneAtttribute/splitScreen/splitScreen.vue

+ 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();
     },
   },