优化前端

This commit is contained in:
2026-04-24 12:51:33 +08:00
parent c0a0111c32
commit cdfba88e47
2 changed files with 9 additions and 2 deletions
@@ -35,7 +35,10 @@ function toggleLocale() {
}
function isActive(path) {
return route.path === path;
if (path === '/') {
return route.path === '/'
}
return route.path.startsWith(path)
}
function handleLogout() {
@@ -51,7 +54,7 @@ const navItems = computed(() => [
{ label: t("appname.schedule"), to: "/schedule" },
{ label: t("appname.purchase"), to: "/purchase" },
{ label: t("appname.work_order"), to: "/work_order" },
{ label: t("appname.warehouse"), to: "/warehouse/container" },
{ label: t("appname.warehouse"), to: "/warehouse" },
]);
</script>
+4
View File
@@ -74,6 +74,10 @@ const router = createRouter({
name: 'work-order-show',
component: () => import('@/views/work_order/ShowWorkOrder.vue'),
},
{
path: 'warehouse',
redirect: '/warehouse/container',
},
{
path: 'warehouse/container',
name: 'warehouse',