refactoring
This commit is contained in:
@@ -52,14 +52,6 @@ import AssetSelector from '../AssetsManagement/AssetSelector.vue';
|
||||
export default {
|
||||
emits:['target', 'preview'],
|
||||
components: { SvgIcon, AssetSelector },
|
||||
data(){
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.active = true;
|
||||
},
|
||||
props:{
|
||||
//context: Object,
|
||||
modelValue: Object,
|
||||
@@ -69,6 +61,14 @@ export default {
|
||||
visible: Boolean,
|
||||
parent: Object
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.active = true;
|
||||
},
|
||||
steps: [['x1', 'y1']],
|
||||
name: 'scene',
|
||||
modifiers: ['x1', 'y1'],
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<v-btn :icon="expandDrawer ? 'mdi-arrow-expand-right' : 'mdi-arrow-expand-left'" variant="plain" size="x-small" density="compact"
|
||||
@click="expandDrawer = !expandDrawer" v-if="selectedItem.length" class="position-absolute z-100 ma-1"></v-btn>
|
||||
<template v-for="(item, i) in flatItems" :key="i">
|
||||
<component :is="components[item.__type]" :ref="`sc-${item.__path}`" :vd="item.vd" v-model="item.data"
|
||||
<component :is="components[item.__type]" :ref="`sc-${item.__path}`"
|
||||
:vd="item.vd" v-model="item.data"
|
||||
@target="setTarget($event, item)" @preview="preview"
|
||||
:visible="item.visible" :cid="item.id" :parent="item.__parent"
|
||||
:selected="selectedItem.includes(item)">
|
||||
@@ -165,6 +166,8 @@ export default {
|
||||
go.__type = 'GameObject';
|
||||
go.__path = `${i.__path}.go-${igo.toString().padStart(4, '0')}`
|
||||
go.__level = 2;
|
||||
go.data.__root = this.object;
|
||||
go.data.__this = go;
|
||||
go.data.items?.forEach((t, it)=>{
|
||||
fi.push(t);
|
||||
t.__parent = go;
|
||||
|
||||
@@ -32,14 +32,6 @@ import Utils from '@/lib/Utils';
|
||||
export default {
|
||||
emits:['target', 'preview'],
|
||||
components: { SvgIcon },
|
||||
data(){
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.active = true;
|
||||
},
|
||||
props:{
|
||||
//context: Object,
|
||||
modelValue: Object,
|
||||
@@ -49,6 +41,14 @@ export default {
|
||||
visible: Boolean,
|
||||
parent: Object
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.active = true;
|
||||
},
|
||||
computed:{
|
||||
showInView(){
|
||||
this.vd.__showInView = this.visible && this.parent.visible && this.parent.__parent.visible;
|
||||
|
||||
Reference in New Issue
Block a user