From 03f0db5816a7ffa6b5f5fab273cf92f3b827174c Mon Sep 17 00:00:00 2001 From: vben Date: Fri, 13 Sep 2024 21:37:05 +0800 Subject: [PATCH 1/2] fix: improve the dialog and drawer scrollbar experience, fix internal click failure problems and warnings --- .../web-ele/src/views/demos/element/index.vue | 12 ++++- packages/@core/base/design/src/css/global.css | 4 +- packages/@core/base/shared/src/utils/dom.ts | 19 ++++++++ packages/@core/composables/src/index.ts | 1 + .../@core/composables/src/use-scroll-lock.ts | 48 +++++++++++++++++++ .../ui-kit/layout-ui/src/vben-layout.vue | 10 ++-- .../ui-kit/popup-ui/src/drawer/drawer-api.ts | 1 + .../ui-kit/popup-ui/src/drawer/drawer.ts | 4 ++ .../ui-kit/popup-ui/src/drawer/drawer.vue | 19 +++++++- .../ui-kit/popup-ui/src/drawer/use-drawer.ts | 2 +- .../@core/ui-kit/popup-ui/src/modal/modal.vue | 13 ++++- .../ui-kit/popup-ui/src/modal/use-modal.ts | 2 +- .../@core/ui-kit/shadcn-ui/build.config.ts | 1 + packages/@core/ui-kit/shadcn-ui/package.json | 1 + .../components/ui/dialog/DialogContent.vue | 19 +++++--- .../components/ui/dialog/DialogOverlay.vue | 11 +++++ .../src/components/ui/sheet/SheetContent.vue | 17 ++++--- .../src/components/ui/sheet/SheetOverlay.vue | 11 +++++ .../layouts/src/basic/tabbar/tabbar.vue | 4 +- pnpm-lock.yaml | 3 ++ scripts/turbo-run/src/run.ts | 38 ++++++++------- 21 files changed, 197 insertions(+), 43 deletions(-) create mode 100644 packages/@core/composables/src/use-scroll-lock.ts create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/dialog/DialogOverlay.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/SheetOverlay.vue diff --git a/apps/web-ele/src/views/demos/element/index.vue b/apps/web-ele/src/views/demos/element/index.vue index dc02759ffcb..8554ecd9602 100644 --- a/apps/web-ele/src/views/demos/element/index.vue +++ b/apps/web-ele/src/views/demos/element/index.vue @@ -1,9 +1,12 @@