From 2155d9f4b0e17c044121c24a03a6409beee32bb8 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 07 二月 2025 11:23:51 +0800 Subject: [PATCH] !181 fix 修复 路由守卫白名单通配符正则覆盖问题 Merge pull request !181 from QianRj/dev --- src/types/router.d.ts | 63 ++++++++++++++++--------------- 1 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/types/router.d.ts b/src/types/router.d.ts index bea70a6..11a60a0 100644 --- a/src/types/router.d.ts +++ b/src/types/router.d.ts @@ -1,35 +1,38 @@ -import { RouteRecordRaw } from 'vue-router'; - +import { LocationQuery, type RouteMeta as VRouteMeta } from 'vue-router'; declare module 'vue-router' { - type RouteOption = { - hidden?: boolean; - permissions?: string[]; - roles?: string[]; - component?: any; - children?: RouteOption[]; - alwaysShow?: boolean; - parentPath?: string; - meta?: { - title: string; - icon?: string; - }; - } & RouteRecordRaw; + interface RouteMeta extends VRouteMeta { + link?: string; + title?: string; + affix?: boolean; + noCache?: boolean; + activeMenu?: string; + icon?: string; + breadcrumb?: boolean; + } - interface _RouteLocationBase { - children?: RouteOption[]; - } + interface _RouteRecordBase { + hidden?: boolean | string | number; + permissions?: string[]; + roles?: string[]; + alwaysShow?: boolean; + query?: string; + parentPath?: string; + } - interface RouteLocationOptions { - fullPath?: string; - } + interface _RouteLocationBase { + children?: _RouteRecordBase[]; + path?: string; + title?: string; + } - interface TagView extends Partial<_RouteLocationBase> { - title?: string; - meta?: { - link?: string; - title?: string; - affix?: boolean; - noCache?: boolean; - }; - } + interface TagView { + fullPath?: string; + name?: string; + path?: string; + title?: string; + meta?: RouteMeta; + query?: LocationQuery; + } } + +export {}; -- Gitblit v1.9.3