Files
toutoukan_front/miniprogram/pages/index/index.ts

21 lines
492 B
TypeScript
Raw Normal View History

2025-08-09 00:30:05 +08:00
// index.ts
// 获取应用实例
const app = getApp<IAppOption>()
Component({
data: {
2025-08-09 17:41:14 +08:00
label_value: 'label_1',
list: [
{ label_value: 'label_1', icon: 'home', ariaLabel: '首页' },
{ label_value: 'label_2', icon: 'chat', ariaLabel: '聊天' },
{ label_value: 'label_3', icon: 'user', ariaLabel: '我的' },
],
2025-08-09 00:30:05 +08:00
},
methods: {
2025-08-09 17:41:14 +08:00
onChange(e: { detail: { value: any; }; }) {
2025-08-09 00:30:05 +08:00
this.setData({
2025-08-09 17:41:14 +08:00
label_value: e.detail.value,
});
2025-08-09 00:30:05 +08:00
},
},
})