File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 <view class =" u-demo-title" >演示效果</view >
55 <view class =" u-demo-area" >
66 <u-toast ref =" uToast" ></u-toast >
7- <u-tabs v-if =" control" bg-color =" #fafafa" :bold =" bold" :active-color =" activeColor" :list =" list"
8- @change =" change" :current =" current" :is-scroll =" isScroll" ></u-tabs >
7+ <u-tabs v-if =" control" bg-color =" #fafafa" :bold =" bold" :active-color =" activeColor" :list =" list"
8+ @change =" change" :current =" current" :is-scroll =" isScroll" :offset = " offset " ></u-tabs >
99 </view >
1010 </view >
1111 <view class =" u-config-wrap" >
3838 return {
3939 list: [],
4040 data: [{
41- name: ' 关注'
41+ name: ' 关注' ,
42+ count: 100
4243 }, {
43- name: ' 推荐'
44+ name: ' 推荐' ,
45+ count: 7
4446 }, {
4547 name: ' 电影'
4648 },{
6264 tabCountIndex: 0 ,
6365 activeColor: this .$u .color [' primary' ],
6466 bold: true ,
65- control: true
67+ control: true ,
68+ offset: [5 , - 5 ]
6669 }
6770 },
6871 onLoad () {
7578 this .list = [];
7679 this .list .push (this .data [0 ]);
7780 this .list .push (this .data [1 ]);
81+ this .offset = [5 , 60 ]
7882 } else if (index == 1 ) {
7983 this .list = [];
8084 this .list .push (this .data [0 ]);
8185 this .list .push (this .data [1 ]);
8286 this .list .push (this .data [2 ]);
87+ this .offset = [5 , 20 ]
8388 } else {
8489 this .list = [];
8590 this .list .push (this .data [0 ]);
8691 this .list .push (this .data [1 ]);
8792 this .list .push (this .data [2 ]);
8893 this .list .push (this .data [3 ]);
94+ this .offset = [5 , 5 ]
8995 }
9096 this .tabCountIndex = index;
9197 this .isScroll = false ;
99105 if (index == 0 ) {
100106 this .isScroll = true ;
101107 this .list = this .data ;
108+ this .offset = [5 , - 5 ]
102109 } else {
103110 this .isScroll = false ;
104111 this .countChange (this .tabCountIndex );
135142
136143<style lang="scss" scoped>
137144 .u-config-wrap {
138-
145+
139146 }
140147 </style >
Original file line number Diff line number Diff line change @@ -278,7 +278,8 @@ export default {
278278 name: ' 待收货'
279279 },
280280 {
281- name: ' 待评价'
281+ name: ' 待评价' ,
282+ count: 12
282283 }
283284 ],
284285 current: 0 ,
You can’t perform that action at this time.
0 commit comments