Skip to content

Commit 36bc753

Browse files
费陶勇费陶勇
authored andcommitted
Merge branch 'dev' of https://github.com/YanxinNet/uView into dev
2 parents 376d3b7 + a0c4418 commit 36bc753

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
// 颜色渐变过程数组
253253
this.colorGradientArr = color.colorGradient(this.inactiveColor, this.activeColor, this.colorStep);
254254
},
255-
// 获取各个tab的节点信息
255+
// 获取各个tab的节点信息
256256
getTabsInfo() {
257257
return new Promise((resolve, reject) => {
258258
let view = uni.createSelectorQuery().in(this);
@@ -355,13 +355,11 @@
355355
// swiper结束滑动
356356
setFinishCurrent(current) {
357357
// 如果滑动的索引不一致,修改tab颜色变化,因为可能会有直接点击tab的情况
358-
if (current != this.animationFinishCurrent) {
359-
this.tabsInfo.map((val, index) => {
360-
if (current == index) val.color = this.activeColor;
361-
else val.color = this.inactiveColor;
362-
return val;
363-
});
364-
}
358+
this.tabsInfo.map((val, index) => {
359+
if (current == index) val.color = this.activeColor;
360+
else val.color = this.inactiveColor;
361+
return val;
362+
});
365363
this.line3AddDx = 0;
366364
this.animationFinishCurrent = current;
367365
this.countLine3Dx();
@@ -372,7 +370,7 @@
372370

373371
<style scoped lang="scss">
374372
@import "../../libs/css/style.components.scss";
375-
373+
376374
view,
377375
scroll-view {
378376
box-sizing: border-box;

0 commit comments

Comments
 (0)