mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 增加i18n支持翻译菜单,tab,title
This commit is contained in:
2
src/typings/route.d.ts
vendored
2
src/typings/route.d.ts
vendored
@ -31,6 +31,8 @@ declare namespace AuthRoute {
|
||||
interface RouteMeta<K extends AuthRoute.RoutePath> {
|
||||
/** 路由标题(可用来作document.title或者菜单的名称) */
|
||||
title: string;
|
||||
/** 用来支持多国语言 如果i18nTitle和title同时存在优先使用i18nTitle */
|
||||
i18nTitle?: string;
|
||||
/** 路由的动态路径(需要动态路径的页面需要将path添加进范型参数) */
|
||||
dynamicPath?: AuthRouteUtils.GetDynamicPath<K>;
|
||||
/** 作为单级路由的父级路由布局组件 */
|
||||
|
2
src/typings/storage.d.ts
vendored
2
src/typings/storage.d.ts
vendored
@ -18,5 +18,7 @@ declare namespace StorageInterface {
|
||||
themeSettings: Theme.Setting;
|
||||
/** 多页签路由信息 */
|
||||
multiTabRoutes: App.GlobalTabRoute[];
|
||||
/** 本地语言缓存 */
|
||||
lang: I18nType.langType;
|
||||
}
|
||||
}
|
||||
|
3
src/typings/system.d.ts
vendored
3
src/typings/system.d.ts
vendored
@ -242,6 +242,7 @@ declare namespace App {
|
||||
routePath: string;
|
||||
icon?: () => import('vue').VNodeChild;
|
||||
children?: GlobalMenuOption[];
|
||||
i18nTitle?: string;
|
||||
};
|
||||
|
||||
/** 面包屑 */
|
||||
@ -252,6 +253,7 @@ declare namespace App {
|
||||
routeName: string;
|
||||
hasChildren: boolean;
|
||||
icon?: import('vue').Component;
|
||||
i18nTitle?: string;
|
||||
options?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
|
||||
};
|
||||
|
||||
@ -300,6 +302,7 @@ declare namespace App {
|
||||
}
|
||||
|
||||
declare namespace I18nType {
|
||||
type langType = 'en' | 'zh-CN';
|
||||
interface Schema {
|
||||
system: {
|
||||
title: string;
|
||||
|
Reference in New Issue
Block a user