mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
28 lines
620 B
JavaScript
28 lines
620 B
JavaScript
import Page from '../../common/page';
|
|
|
|
Page({
|
|
data: {
|
|
active: 0,
|
|
active2: 'home',
|
|
active3: 0,
|
|
active4: 0,
|
|
active5: 0,
|
|
active6: 0,
|
|
icon: {
|
|
normal: 'https://img.yzcdn.cn/vant/user-inactive.png',
|
|
active: 'https://img.yzcdn.cn/vant/user-active.png'
|
|
}
|
|
},
|
|
|
|
onChange(event) {
|
|
const { key } = event.currentTarget.dataset;
|
|
this.setData({ [key]: event.detail });
|
|
},
|
|
|
|
handleChange(event) {
|
|
const { key } = event.currentTarget.dataset;
|
|
this.setData({ [key]: event.detail });
|
|
wx.showToast({ title: `点击标签 ${event.detail + 1}`, icon: 'none' });
|
|
}
|
|
});
|