Files
sundynix-pets/pets-fe/components/tab-bar/index.js
T
Blizzard 8a3036f0db
ci-cd / verify (push) Successful in 4s
ci-cd / deploy (push) Skipped
Redesign mini program navigation and add back controls
2026-10-04 09:48:12 +08:00

18 lines
563 B
JavaScript

const tabs = [
{ path: "/pages/home/home", label: "首页", key: "home" },
{ path: "/pages/meetups/meetups", label: "约遛", key: "meetups" },
{ path: "/pages/walk/walk", label: "遛狗", key: "walk" },
{ path: "/pages/tasks/tasks", label: "任务", key: "tasks" },
{ path: "/pages/pets/pets", label: "宠物", key: "pets" },
];
Component({
properties: { current: String },
data: { tabs },
methods: {
go(e) {
const path = e.currentTarget.dataset.path;
if (path !== this.data.current) wx.redirectTo({ url: path });
},
},
});