chore(types): 添加路由 meta 属性说明
This commit is contained in:
13
types/web.d.ts
vendored
13
types/web.d.ts
vendored
@@ -4,7 +4,7 @@ import type {
|
|||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
RouteLocationRaw,
|
RouteLocationRaw, RouteRecordRaw,
|
||||||
} from 'vue-router';
|
} from 'vue-router';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@@ -86,14 +86,25 @@ declare global {
|
|||||||
|
|
||||||
// Vue Router
|
// Vue Router
|
||||||
type VueRouteLocationRaw = RouteLocationRaw;
|
type VueRouteLocationRaw = RouteLocationRaw;
|
||||||
|
type VueRouteRecordRaw = RouteRecordRaw;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue-router' {
|
declare module 'vue-router' {
|
||||||
interface RouteMeta {
|
interface RouteMeta {
|
||||||
|
|
||||||
|
/** 主界面侧边栏图标 class */
|
||||||
iconClass?: string;
|
iconClass?: string;
|
||||||
|
|
||||||
|
/** 是否为工具页面 */
|
||||||
|
isToolDetail?: boolean;
|
||||||
|
|
||||||
|
/** 是否在主界面侧边栏显示 */
|
||||||
showInAside?: boolean;
|
showInAside?: boolean;
|
||||||
|
|
||||||
|
/** 页面标题 */
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user