From 26646d42f7afc0cb4e5d5f04c780b485d4f942ee Mon Sep 17 00:00:00 2001 From: Vben Date: Thu, 26 Sep 2024 22:50:37 +0800 Subject: [PATCH] fix: when modal and drawer exist at the same time, click Close All (#4521) --- packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue | 4 ++-- .../ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue b/packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue index 025ca7420e5..c15cdb9d2a9 100644 --- a/packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue +++ b/packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue @@ -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(); } } diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue index 64113eeef6f..1be8b01156f 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue @@ -6,6 +6,6 @@ useScrollLock();