DTL panel - click outside to close the panel

This commit is contained in:
isUnknown 2025-01-23 13:50:24 +01:00
parent ea6c304072
commit cf4352c658
2 changed files with 18 additions and 2 deletions

View file

@ -7,7 +7,7 @@
<DTLPanel v-if="isDTLPanelOpen" @close="isDTLPanelOpen = false" />
<DTLButton
v-if="page?.designToLight?.length > 0"
@click="isDTLPanelOpen = !isDTLPanelOpen"
@click="openDTLPanel($event)"
/>
</template>
@ -22,4 +22,10 @@ import { ref } from "vue";
const { page } = storeToRefs(usePageStore());
const isDTLPanelOpen = ref(false);
// Functions
function openDTLPanel(event) {
isDTLPanelOpen.value = true;
event.stopImmediatePropagation();
}
</script>