diff --git a/src/components/Game.vue b/src/components/Game.vue index 8fa3141..680273a 100644 --- a/src/components/Game.vue +++ b/src/components/Game.vue @@ -4,7 +4,6 @@ v-for="(tab, index) in tabs" :key="index" class="tab" - :ref="`tab-${index}`" :style="unref(layers[tab]?.style)" :class="unref(layers[tab]?.classes)" > @@ -14,7 +13,7 @@ v-if="layerKeys.includes(tab)" v-bind="gatherLayerProps(layers[tab]!)" :index="index" - :tab="() => (($refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])" + @set-minimized="value => (layers[tab]!.minimized.value = value)" /> diff --git a/src/components/Layer.vue b/src/components/Layer.vue index 2d89ed2..fd7c4e4 100644 --- a/src/components/Layer.vue +++ b/src/components/Layer.vue @@ -2,7 +2,11 @@
- @@ -11,7 +15,8 @@
- @@ -41,7 +46,7 @@ export default defineComponent({ }, minimizedDisplay: processedPropType(Object, String, Function), minimized: { - type: Object as PropType>, + type: Object as PropType>, required: true }, name: { @@ -55,6 +60,7 @@ export default defineComponent({ required: true } }, + emits: ["setMinimized"], setup(props) { const { display, index, minimized, minimizedDisplay } = toRefs(props); @@ -78,8 +84,7 @@ export default defineComponent({ showGoBack, updateNodes, unref, - goBack, - setMinimized + goBack }; } });