fix(tab-row): Optimize tab-row scrolling experience

This commit is contained in:
SiriusXT 2025-05-28 16:46:56 +08:00
parent 111258b539
commit bbc77b522f

View File

@ -386,15 +386,8 @@ export default class TabRowWidget extends BasicWidget {
};
setupScrollEvents() {
let isScrolling = false;
this.$tabScrollingContainer[0].addEventListener('wheel', (event) => {
if (!isScrolling) {
isScrolling = true;
requestAnimationFrame(() => {
this.scrollTabContainer(event.deltaY * 1.5, 'instant');
isScrolling = false;
});
}
this.scrollTabContainer(event.deltaY * 1.5);
});
this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-200));