feat(projects): 菜单数据及组件接入

This commit is contained in:
Soybean
2021-09-15 07:35:38 +08:00
parent 57e00e6417
commit 3226a724be
25 changed files with 361 additions and 95 deletions

View File

@ -1,8 +1,10 @@
import type { Component } from 'vue';
import type { RouteRecordRaw } from 'vue-router';
import type { MenuOption } from 'naive-ui';
import { EnumRoutePath, EnumLoginModule } from '@/enum';
/** 路由描述 */
export interface RouteMeta {
interface RouteMeta {
/** 路由名称 */
title?: string;
/** 页面100%视高 */
@ -10,11 +12,16 @@ export interface RouteMeta {
/** 作为菜单 */
asMenu?: boolean;
/** 菜单和面包屑对应的图标 */
icon?: string;
icon?: Component;
}
export type CustomRoute = RouteRecordRaw & { meta: RouteMeta };
export type RoutePathKey = keyof typeof EnumRoutePath;
export type GlobalMenuOption = MenuOption & {
routeName: string;
routePath: string;
};
export type LoginModuleType = keyof typeof EnumLoginModule;

View File

@ -1,3 +1,3 @@
export { UserInfo } from './business';
export { ThemeSettings, NavMode, AnimateType } from './theme';
export { CustomRoute, RoutePathKey, LoginModuleType } from './common';
export { CustomRoute, RoutePathKey, GlobalMenuOption, LoginModuleType } from './common';