2026-01-12 16:29:53 +08:00
|
|
|
Component({
|
|
|
|
|
options: { multipleSlots: true },
|
|
|
|
|
/**
|
|
|
|
|
* 组件的属性列表
|
|
|
|
|
*/
|
|
|
|
|
properties: {
|
|
|
|
|
active: {
|
|
|
|
|
type: String,
|
2026-01-14 16:54:47 +08:00
|
|
|
value: "",
|
2026-01-12 16:29:53 +08:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组件的初始数据
|
|
|
|
|
*/
|
|
|
|
|
data: {
|
|
|
|
|
list: [
|
2026-01-14 16:54:47 +08:00
|
|
|
{ value: "index", label: "首页", icon: "home" },
|
2026-01-12 16:29:53 +08:00
|
|
|
{ value: "scan", label: "扫码", icon: "scan" },
|
|
|
|
|
{ value: "my", label: "我的", icon: "user" },
|
|
|
|
|
],
|
|
|
|
|
pages: {
|
|
|
|
|
index: "/pages/index/index",
|
|
|
|
|
scan: "/pages/processEntry/processEntry",
|
|
|
|
|
my: "/pages/my/my",
|
|
|
|
|
} as Record<string, string>,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组件的方法列表
|
|
|
|
|
*/
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(e: any) {
|
2026-01-14 16:54:47 +08:00
|
|
|
if (e.detail.value != this.data.active) {
|
|
|
|
|
wx.reLaunch({ url: this.data.pages[e.detail.value] });
|
2026-01-12 16:29:53 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|