|
@@ -28,6 +28,7 @@
|
|
|
@close="$set(layers, i, false)"
|
|
|
@handleCheckChange="handleCheckChange"
|
|
|
></layer-manage-split>
|
|
|
+ <input v-model="toolTitle" type="text" class="sm-toolTitle" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -39,6 +40,7 @@ export default {
|
|
|
return {
|
|
|
layers: [],
|
|
|
checkedKeys: [],
|
|
|
+ toolTitle: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -63,17 +65,27 @@ export default {
|
|
|
value(val) {
|
|
|
this.layers = Array(val);
|
|
|
this.checkedKeys = Array(val);
|
|
|
+ this.toolTitle = Array(val);
|
|
|
+ this.setCheckeds();
|
|
|
},
|
|
|
},
|
|
|
// inject: ["checkedChange"],
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
+ setCheckeds() {
|
|
|
+ for (let i = 0; i < this.checkedKeys.length; i++) {
|
|
|
+ this.checkedKeys[i] = [store.state.checkedData.id];
|
|
|
+ this.toolTitle[i] = [store.state.checkedData.title];
|
|
|
+ }
|
|
|
+ },
|
|
|
handleCheckChange(obj, checked, splitId) {
|
|
|
if (obj.children && obj.children.length > 0) {
|
|
|
for (let i = 0; i < obj.children.length; i++) {
|
|
|
this.handleCheckChange(obj.children[i], checked);
|
|
|
}
|
|
|
} else {
|
|
|
+ this.toolTitle = obj.title;
|
|
|
+ store.setCheckedData(obj);
|
|
|
console.log(obj.title, obj.type, splitId, "q");
|
|
|
// if (obj.checked) {
|
|
|
let sceneLayer;
|
|
@@ -155,5 +167,14 @@ export default {
|
|
|
.h50 {
|
|
|
height: 50%;
|
|
|
}
|
|
|
+.sm-toolTitle {
|
|
|
+ width: 400px;
|
|
|
+ height: 80px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ position: absolute;
|
|
|
+ top: 80px;
|
|
|
+ left: calc(50% - 50px);
|
|
|
+}
|
|
|
</style>
|
|
|
|