Files
toutoukan_front/miniprogram/pages/index/index.ts
2025-09-24 21:37:23 +08:00

23 lines
567 B
TypeScript

// index.ts
// 获取应用实例
const app = getApp<IAppOption>()
Component({
data: {
label_value: 'label_1',
list: [
{ label_value: 'label_1', icon: 'home', ariaLabel: '首页' },
{ label_value: 'label_2', icon: 'add', ariaLabel: '聊天' },
{ label_value: 'label_3', icon: 'shop', ariaLabel: '商城' },
{ label_value: 'label_4', icon: 'user', ariaLabel: '我的' },
],
},
methods: {
onChange(e: { detail: { value: any; }; }) {
this.setData({
label_value: e.detail.value,
});
},
},
})