fix: when multiple pop-ups exist at the same time, clicking will close all (#4548)

This commit is contained in:
Vben
2024-09-29 22:15:43 +08:00
committed by GitHub
parent d1e1256202
commit 3572ce1538
4 changed files with 22 additions and 8 deletions

View File

@@ -1,11 +1,14 @@
<script setup lang="ts">
import { inject } from 'vue';
import { useScrollLock } from '@vben-core/composables';
useScrollLock();
const id = inject('DISMISSABLE_MODAL_ID');
</script>
<template>
<div
:data-dismissable-modal="id"
class="bg-overlay fixed inset-0 z-[1000]"
data-dismissable-modal="true"
></div>
</template>

View File

@@ -1,11 +1,14 @@
<script setup lang="ts">
import { inject } from 'vue';
import { useScrollLock } from '@vben-core/composables';
useScrollLock();
const id = inject('DISMISSABLE_DRAWER_ID');
</script>
<template>
<div
:data-dismissable-drawer="id"
class="bg-overlay fixed inset-0 z-[1000]"
data-dismissable-drawer="true"
></div>
</template>