From d71a20ad0a68b553461c1473bdb616285c55b6b6 Mon Sep 17 00:00:00 2001 From: Vben Date: Thu, 15 Aug 2024 23:30:07 +0800 Subject: [PATCH] perf: improve tabs-view scrolling (#4164) --- .github/release-drafter.yml | 2 +- packages/@core/base/icons/src/lucide.ts | 1 + .../src/components/tabs-chrome/tabs.vue | 2 +- .../tabs-ui/src/components/tabs/tabs.vue | 4 +- .../@core/ui-kit/tabs-ui/src/tabs-view.vue | 46 +++++++++++++-- .../tabs-ui/src/use-tabs-view-scroll.ts | 59 +++++++++++++++++++ packages/effects/layouts/package.json | 1 - .../layouts/src/basic/tabbar/tabbar.vue | 26 +------- pnpm-lock.yaml | 23 -------- 9 files changed, 107 insertions(+), 57 deletions(-) create mode 100644 packages/@core/ui-kit/tabs-ui/src/use-tabs-view-scroll.ts diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index fd88affe4..3bc19a628 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -42,9 +42,9 @@ version-resolver: minor: labels: - "minor" - - "feature" patch: labels: + - "feature" - "patch" - "bug" - "maintenance" diff --git a/packages/@core/base/icons/src/lucide.ts b/packages/@core/base/icons/src/lucide.ts index 6c6eeb9eb..1f14f32c7 100644 --- a/packages/@core/base/icons/src/lucide.ts +++ b/packages/@core/base/icons/src/lucide.ts @@ -9,6 +9,7 @@ export { Bell, BookOpenText, ChevronDown, + ChevronLeft, ChevronRight, CircleHelp, Copy, diff --git a/packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue b/packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue index d45ea61ce..b6e7d92dd 100644 --- a/packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue +++ b/packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue @@ -75,7 +75,7 @@ function scrollIntoView() { id="tabs-scrollbar" class="tabs-chrome__scrollbar h-full" horizontal - scroll-bar-class="z-10" + scroll-bar-class="z-10 hidden" >