feat(projects): 菜单字典适配 i18n

This commit is contained in:
xlsea
2025-06-11 20:36:53 +08:00
parent d141ed5bef
commit 39dd9acca9
8 changed files with 52 additions and 10 deletions

View File

@ -103,6 +103,9 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
// eslint-disable-next-line complexity
function parseRouter(route: ElegantConstRoute, parent?: ElegantConstRoute) {
route.meta = route.meta ? route.meta : { title: route.name };
if (route.meta.title.startsWith('route.')) {
route.meta.i18nKey = route.meta.title as App.I18n.I18nKey;
}
const isLayout = route.component === 'Layout';
const isFramePage = route.component === 'FrameView';
const isParentLayout = route.component === 'ParentView';