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