From 4d855627e826cc503039907afe709b17ace61e9f Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Sun, 12 Apr 2026 10:12:03 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=A1=E7=90=86=E9=85=8D=E6=96=B9tab?= =?UTF-8?q?=E4=BB=85=E5=AF=B9=E7=BC=96=E8=BE=91=E8=80=85=E4=BB=A5=E4=B8=8A?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=8F=AF=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 未登录用户和viewer不再看到管理配方tab。 Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/App.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index f8c387a..26084ff 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -78,7 +78,7 @@ const navTabsRef = ref(null) // hide: 完全隐藏(只有满足条件才显示) const allTabs = [ { key: 'search', icon: '🔍', label: '配方查询' }, - { key: 'manage', icon: '📋', label: '管理配方', require: 'login' }, + { key: 'manage', icon: '📋', label: '管理配方', hide: 'editor' }, { key: 'inventory', icon: '📦', label: '个人库存', require: 'login' }, { key: 'oils', icon: '💧', label: '精油价目' }, { key: 'projects', icon: '💼', label: '商业核算', require: 'login' }, @@ -88,6 +88,7 @@ const allTabs = [ const visibleTabs = computed(() => allTabs.filter(t => { if (!t.hide) return true if (t.hide === 'admin') return auth.isAdmin + if (t.hide === 'editor') return auth.canEdit return true })) const unreadNotifCount = ref(0)