Skip to content

Commit

Permalink
perf: 优化标签栏滚动体验
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed May 28, 2024
1 parent fda4817 commit 03e5e99
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/layouts/components/Topbar/Tabbar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ function tabbarScrollTip() {
}
}
function handlerMouserScroll(event: WheelEvent) {
if (event.deltaY || event.detail !== 0) {
tabsRef.value.scrollBy({
left: (event.deltaY || event.detail) > 0 ? 50 : -50,
})
}
tabsRef.value.scrollBy({
left: event.deltaY || event.detail,
})
}
function scrollTo(offsetLeft: number) {
tabsRef.value.scrollTo({
Expand Down

0 comments on commit 03e5e99

Please sign in to comment.