mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
* [improvement] Tab:升级到自定义组件 * fix: 去除冗余example代码 * [refactor] 重构badge为自定义组件 (#160) * fix: 去除tab组件使用对象入参方式,修改example用例
76 lines
1.3 KiB
JavaScript
76 lines
1.3 KiB
JavaScript
const interval = 50;
|
|
let moduleId = 1;
|
|
|
|
Page({
|
|
data: {
|
|
tab1: {
|
|
list: [{
|
|
id: 'all',
|
|
title: '全部'
|
|
}, {
|
|
id: 'topay',
|
|
title: '待付款'
|
|
}, {
|
|
id: 'tosend',
|
|
title: '待发货'
|
|
}, {
|
|
id: 'send',
|
|
title: '待收货'
|
|
}, {
|
|
id: 'sign',
|
|
title: '已完成订单'
|
|
}],
|
|
selectedId: 'all'
|
|
},
|
|
tab2: {
|
|
list: [{
|
|
id: '1',
|
|
title: '最新商品1'
|
|
}, {
|
|
id: '2',
|
|
title: '最新商品2'
|
|
}, {
|
|
id: '3',
|
|
title: '最新商品3'
|
|
}, {
|
|
id: '4',
|
|
title: '最新商品4'
|
|
}, {
|
|
id: '5',
|
|
title: '最新商品5'
|
|
}, {
|
|
id: '6',
|
|
title: '最新商品6'
|
|
}],
|
|
selectedId: '1',
|
|
scroll: true,
|
|
height: 80
|
|
},
|
|
tab3: {
|
|
list: [{
|
|
id: '1',
|
|
title: '商品1'
|
|
}, {
|
|
id: '2',
|
|
title: '商品2'
|
|
}, {
|
|
id: '3',
|
|
title: '商品3'
|
|
}, {
|
|
id: '4',
|
|
title: '商品4'
|
|
}, {
|
|
id: '5',
|
|
title: '商品5'
|
|
}, {
|
|
id: '6',
|
|
title: '商品6'
|
|
}],
|
|
selectedId: '1',
|
|
height: 45,
|
|
scroll: true,
|
|
fixed: true
|
|
}
|
|
}
|
|
});
|