修改选项卡点击位置更新

master
于肖磊 2025-02-17 09:52:15 +08:00
parent 8a6887043a
commit 670d495ee2
1 changed files with 5 additions and 1 deletions

View File

@ -400,7 +400,11 @@
.boundingClientRect((rect) => { .boundingClientRect((rect) => {
const tabs_index = this.form.tabs_list.findIndex(item => item.is_sliding_fixed == '1'); const tabs_index = this.form.tabs_list.findIndex(item => item.is_sliding_fixed == '1');
// left left // left left
const new_width = tabs_index == 0 && index != 0 ? rect[1].left - rect[0].width - rect[0].left : rect[0].left; let new_width = tabs_index == 0 && index != 0 ? rect[1].left - rect[0].width - rect[0].left : rect[0].left;
//
if (index > 0 && tabs_index == index) {
new_width = rect[index + 1].left + rect[index].width
}
const scrollLeft = const scrollLeft =
rect[index].left + rect[index].left +
rect[index].width / 2 - rect[index].width / 2 -