fix: 修复审批详情路由缓存卡住

- 关闭审批管理菜单的不安全页面缓存

- 增加审批隐藏详情路由的缓存回归测试
This commit is contained in:
2026-07-23 14:58:23 +08:00
parent 19059fde96
commit caa1f07b66
2 changed files with 9 additions and 0 deletions

View File

@@ -37,4 +37,12 @@ describe('route cache safety', () => {
expect(unrelatedRoute.meta?.keepAlive).toBe(true); expect(unrelatedRoute.meta?.keepAlive).toBe(true);
}); });
it('disables stale approval menu caching before opening hidden details', () => {
const approvalRoute = createRoute('/sys/approval');
disableUnsafeMenuRouteCaching([approvalRoute]);
expect(approvalRoute.meta?.keepAlive).toBe(false);
});
}); });

View File

@@ -7,6 +7,7 @@ const UNSAFE_KEEP_ALIVE_MENU_PATHS = new Set([
'/ai/skill', '/ai/skill',
'/ai/workflow', '/ai/workflow',
'/dashboard/workspace', '/dashboard/workspace',
'/sys/approval',
'/sys/sysAccount', '/sys/sysAccount',
]); ]);