fix: when modal and drawer exist at the same time, click Close All (#4521)

pull/48/MERGE
Vben 2024-09-26 22:50:37 +08:00 committed by GitHub
parent 17fa8eb93b
commit 26646d42f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -83,8 +83,8 @@ function escapeKeyDown(e: KeyboardEvent) {
// pointer-down-outside
function pointerDownOutside(e: Event) {
const target = e.target as HTMLElement;
const isDismissableModal = !!target?.dataset.dismissableModal;
if (!closeOnClickModal.value || !isDismissableModal) {
const dismissableDrawer = !!target?.dataset.dismissableDrawer;
if (!closeOnClickModal.value || !dismissableDrawer) {
e.preventDefault();
}
}

View File

@ -6,6 +6,6 @@ useScrollLock();
<template>
<div
class="bg-overlay fixed inset-0 z-[1000]"
data-dismissable-modal="true"
data-dismissable-drawer="true"
></div>
</template>