18 lines
560 B
JavaScript
18 lines
560 B
JavaScript
const tabs = [
|
|
{ path: "/pages/home/home", label: "首页", icon: "⌂" },
|
|
{ path: "/pages/meetups/meetups", label: "约遛", icon: "♡" },
|
|
{ path: "/pages/walk/walk", label: "遛狗", icon: "🐾" },
|
|
{ path: "/pages/tasks/tasks", label: "任务", icon: "☑" },
|
|
{ path: "/pages/pets/pets", label: "宠物", icon: "♙" },
|
|
];
|
|
Component({
|
|
properties: { current: String },
|
|
data: { tabs },
|
|
methods: {
|
|
go(e) {
|
|
const path = e.currentTarget.dataset.path;
|
|
if (path !== this.data.current) wx.redirectTo({ url: path });
|
|
},
|
|
},
|
|
});
|