Skip to content

Commit 4e767e7

Browse files
committed
解决快速滑动会显示错乱的问题
1 parent 1fe089d commit 4e767e7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎pages/template/tabbar/tabbar.vue‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@
149149
}
150150
},
151151
async changeTab(e) {
152-
let index = e.target.current;
152+
let index = e.target.current;
153+
this.tabIndex = index;
153154
if (this.newsitems[index].data.length === 0) {
154155
this.addData(index)
155156
}
156157
if (this.isClickChange) {
157-
this.tabIndex = index;
158158
this.isClickChange = false;
159159
return;
160160
}
@@ -176,7 +176,6 @@
176176
this.scrollLeft = width;
177177
}
178178
this.isClickChange = false;
179-
this.tabIndex = index; //一旦访问data就会出问题
180179
},
181180
getElSize(id) { //得到元素的size
182181
return new Promise((res, rej) => {

0 commit comments

Comments
 (0)