From 32b44bdeec8e9192c27ddf5534c13e0fe2982601 Mon Sep 17 00:00:00 2001 From: Stev_Wang <304865932@qq.com> Date: Wed, 4 Nov 2026 10:26:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor(web):=20=E4=BE=A7=E6=A0=8F=E3=80=8C?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E3=80=8D=E6=9B=B4=E5=90=8D=E4=B8=BA=E3=80=8C?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 背景:进入 A4 数据字典与系统配置阶段,产品口径统一为「数据字典」。\n改动:nav-config 菜单 label 与 description;补充 nav-config 单测。\n影响面:仅管理中心侧栏文案;路由 /system/dicts 与权限 dict:manage 不变。\n回滚:回滚本提交即可。\n验证:nav-config 单测 10/10;web lint / typecheck / 全量单测 126 通过;prettier 通过。 --- apps/web/src/navigation/nav-config.spec.ts | 8 ++++++++ apps/web/src/navigation/nav-config.ts | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/web/src/navigation/nav-config.spec.ts b/apps/web/src/navigation/nav-config.spec.ts index d68c751..e146f5d 100644 --- a/apps/web/src/navigation/nav-config.spec.ts +++ b/apps/web/src/navigation/nav-config.spec.ts @@ -67,6 +67,14 @@ describe('导航配置', () => { expect(findActiveNav(NAV_MODULES, '/system/industries')?.item?.label).toBe('行业管理'); }); + it('字典菜单按 A4 口径更名「数据字典」', () => { + const systemItems = NAV_MODULES.find((module) => module.key === 'system')?.items ?? []; + const dictItem = systemItems.find((item) => item.key === 'dicts'); + expect(dictItem?.label).toBe('数据字典'); + expect(dictItem?.permission).toBe('dict:manage'); + expect(findActiveNav(NAV_MODULES, '/system/dicts')?.item?.label).toBe('数据字典'); + }); + it('按路径定位当前模块与菜单', () => { const active = findActiveNav(NAV_MODULES, '/material/quick-review'); expect(active?.module.key).toBe('material'); diff --git a/apps/web/src/navigation/nav-config.ts b/apps/web/src/navigation/nav-config.ts index 68e4088..18eb7ef 100644 --- a/apps/web/src/navigation/nav-config.ts +++ b/apps/web/src/navigation/nav-config.ts @@ -297,11 +297,11 @@ export const NAV_MODULES: readonly NavModule[] = [ }, { key: 'dicts', - label: '字典', + label: '数据字典', path: '/system/dicts', icon: IconDocs, permission: Permission.DICT_MANAGE, - description: '核心字典与业务枚举', + description: '平台枚举、行业词表与编码管理', }, { key: 'audit',