feat(projects): add menu route field

This commit is contained in:
paynezhuang
2024-04-26 20:00:23 +08:00
parent a1920fcad9
commit dbe31eb1dc
7 changed files with 258 additions and 66 deletions

14
src/typings/api.d.ts vendored
View File

@ -198,6 +198,12 @@ declare namespace Api {
order: number;
/** whether to cache the route */
keepAlive?: boolean;
/**
* Is constant route
*
* Does not need to login, and the route is defined in the front-end
*/
constant?: boolean;
/** outer link */
href?: string;
/** whether to hide the route in the menu */
@ -215,8 +221,16 @@ declare namespace Api {
multiTab?: boolean;
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
fixedIndexInTab?: number;
/** if set query parameters, it will be automatically carried when entering the route */
query: Record<string, string>;
/** menu buttons */
buttons?: MenuButton[];
/**
* Roles of the route
*
* Route can be accessed if the current user has at least one of the roles
*/
roles?: string[];
/** children menu */
children?: Menu[];
}>;

View File

@ -539,12 +539,15 @@ declare namespace App {
localIcon: string;
iconTypeTitle: string;
order: string;
constant: string;
keepAlive: string;
href: string;
hideInMenu: string;
activeMenu: string;
multiTab: string;
fixedIndexInTab: string;
roles: string;
query: string;
button: string;
buttonCode: string;
buttonDesc: string;
@ -568,6 +571,9 @@ declare namespace App {
multiTab: string;
fixedInTab: string;
fixedIndexInTab: string;
roles: string;
queryKey: string;
queryValue: string;
button: string;
buttonCode: string;
buttonDesc: string;

View File

@ -19,9 +19,11 @@ declare module 'vue' {
IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default']
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
'IconIc:roundPlus': typeof import('~icons/ic/round-plus')['default']
IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default']
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
IconLocalBanner: typeof import('~icons/local/banner')['default']
IconLocalLogo: typeof import('~icons/local/logo')['default']
@ -49,6 +51,7 @@ declare module 'vue' {
NDrawer: typeof import('naive-ui')['NDrawer']
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
NDropdown: typeof import('naive-ui')['NDropdown']
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']