feat(other): 新增菜单字典多语言适配 SQL

This commit is contained in:
xlsea
2025-06-18 22:58:48 +08:00
parent 27f061957e
commit 0f33f4a301
7 changed files with 65 additions and 32 deletions

View File

@ -94,7 +94,7 @@ 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.')) {
if (route.meta.title.startsWith('route.') || route.meta.title.startsWith('menu.')) {
route.meta.i18nKey = route.meta.title as App.I18n.I18nKey;
}
const isLayout = route.component === 'Layout';