26 lines
616 B
TypeScript
26 lines
616 B
TypeScript
// index.ts
|
|
|
|
import { IAppOption } from "../../../typings";
|
|
|
|
// 获取应用实例
|
|
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,
|
|
});
|
|
},
|
|
},
|
|
})
|