mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
* feat(Steps): add click event * feat(Steps): code gap * feat: click event name adjustment
37 lines
581 B
JavaScript
37 lines
581 B
JavaScript
import Page from '../../common/page';
|
|
import Toast from '../../dist/toast/toast';
|
|
|
|
Page({
|
|
data: {
|
|
active: 1,
|
|
steps: [
|
|
{
|
|
text: '步骤一',
|
|
desc: '描述信息'
|
|
},
|
|
{
|
|
text: '步骤二',
|
|
desc: '描述信息'
|
|
},
|
|
{
|
|
text: '步骤三',
|
|
desc: '描述信息'
|
|
},
|
|
{
|
|
text: '步骤四',
|
|
desc: '描述信息'
|
|
}
|
|
]
|
|
},
|
|
|
|
nextStep() {
|
|
this.setData({
|
|
active: ++this.data.active % 4
|
|
});
|
|
},
|
|
|
|
onClick(event) {
|
|
Toast(`Index: ${event.detail}`);
|
|
},
|
|
});
|