File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
uview-ui/components/u-tabs-swiper Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 252
252
// 颜色渐变过程数组
253
253
this .colorGradientArr = color .colorGradient (this .inactiveColor , this .activeColor , this .colorStep );
254
254
},
255
- // 获取各个tab的节点信息
255
+ // 获取各个tab的节点信息
256
256
getTabsInfo () {
257
257
return new Promise ((resolve , reject ) => {
258
258
let view = uni .createSelectorQuery ().in (this );
355
355
// swiper结束滑动
356
356
setFinishCurrent (current ) {
357
357
// 如果滑动的索引不一致,修改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
+ });
365
363
this .line3AddDx = 0 ;
366
364
this .animationFinishCurrent = current;
367
365
this .countLine3Dx ();
372
370
373
371
<style scoped lang="scss">
374
372
@import " ../../libs/css/style.components.scss" ;
375
-
373
+
376
374
view ,
377
375
scroll-view {
378
376
box-sizing : border-box ;
You can’t perform that action at this time.
0 commit comments