chore(types): 添加路由 meta 属性说明

This commit is contained in:
2024-09-06 20:42:32 +08:00
parent 9ad6d3bb9d
commit 838856e53f

13
types/web.d.ts vendored
View File

@@ -4,7 +4,7 @@ import type {
} from 'vue';
import type {
RouteLocationRaw,
RouteLocationRaw, RouteRecordRaw,
} from 'vue-router';
declare global {
@@ -86,14 +86,25 @@ declare global {
// Vue Router
type VueRouteLocationRaw = RouteLocationRaw;
type VueRouteRecordRaw = RouteRecordRaw;
}
declare module 'vue-router' {
interface RouteMeta {
/** 主界面侧边栏图标 class */
iconClass?: string;
/** 是否为工具页面 */
isToolDetail?: boolean;
/** 是否在主界面侧边栏显示 */
showInAside?: boolean;
/** 页面标题 */
title?: string;
}
}