Lindy bf0b96c469
feat(Steps): add click event (#2874)
* feat(Steps): add click event

* feat(Steps): code gap

* feat: click event name adjustment
2020-03-17 19:46:21 +08:00

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}`);
},
});