perf(设置): 添加首页启用开关配置

在系统设置中添加首页启用开关配置项,包括前端路由守卫检查、多语言支持和表单配置,以控制是否显示首页
This commit is contained in:
xiaojunnuo
2026-05-07 23:15:50 +08:00
parent 6b6f1604e9
commit 25ad1e6f86
7 changed files with 16 additions and 1 deletions
@@ -47,6 +47,13 @@ export function setupCommonGuard(router: Router) {
const settingStore = useSettingStore();
await settingStore.initOnce();
if (to.path === "/" && settingStore.sysPublic?.homePageEnabled === false) {
return {
path: DEFAULT_HOME_PATH,
replace: true,
};
}
to.meta.loaded = loadedPaths.has(to.path);
// 页面加载进度条