From cdfba88e47b2f5b0807f4a98cbbe9d307412a74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Fri, 24 Apr 2026 12:51:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ops_vue_js/src/components/AppHeader.vue | 7 +++++-- frontend/ops_vue_js/src/router/index.js | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/ops_vue_js/src/components/AppHeader.vue b/frontend/ops_vue_js/src/components/AppHeader.vue index aba4b0b..b35ce43 100644 --- a/frontend/ops_vue_js/src/components/AppHeader.vue +++ b/frontend/ops_vue_js/src/components/AppHeader.vue @@ -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" }, ]); diff --git a/frontend/ops_vue_js/src/router/index.js b/frontend/ops_vue_js/src/router/index.js index da2b57c..e06f0c8 100644 --- a/frontend/ops_vue_js/src/router/index.js +++ b/frontend/ops_vue_js/src/router/index.js @@ -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',