From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 types/router.d.ts |   84 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/types/router.d.ts b/types/router.d.ts
new file mode 100644
index 0000000..03e91f1
--- /dev/null
+++ b/types/router.d.ts
@@ -0,0 +1,84 @@
+import type { RouteRecordRaw } from 'vue-router'
+import { defineComponent } from 'vue'
+
+/**
+* redirect: noredirect        褰撹缃� noredirect 鐨勬椂鍊欒璺敱鍦ㄩ潰鍖呭睉瀵艰埅涓笉鍙鐐瑰嚮
+* name:'router-name'          璁惧畾璺敱鐨勫悕瀛楋紝涓�瀹氳濉啓涓嶇劧浣跨敤<keep-alive>鏃朵細鍑虹幇鍚勭闂
+* meta : {
+    hidden: true              褰撹缃� true 鐨勬椂鍊欒璺敱涓嶄細鍐嶄晶杈规爮鍑虹幇 濡�404锛宭ogin绛夐〉闈�(榛樿 false)
+
+    alwaysShow: true          褰撲綘涓�涓矾鐢变笅闈㈢殑 children 澹版槑鐨勮矾鐢卞ぇ浜�1涓椂锛岃嚜鍔ㄤ細鍙樻垚宓屽鐨勬ā寮忥紝
+                              鍙湁涓�涓椂锛屼細灏嗛偅涓瓙璺敱褰撳仛鏍硅矾鐢辨樉绀哄湪渚ц竟鏍忥紝
+                              鑻ヤ綘鎯充笉绠¤矾鐢变笅闈㈢殑 children 澹版槑鐨勪釜鏁伴兘鏄剧ず浣犵殑鏍硅矾鐢憋紝
+                              浣犲彲浠ヨ缃� alwaysShow: true锛岃繖鏍峰畠灏变細蹇界暐涔嬪墠瀹氫箟鐨勮鍒欙紝
+                              涓�鐩存樉绀烘牴璺敱(榛樿 false)
+
+    title: 'title'            璁剧疆璇ヨ矾鐢卞湪渚ц竟鏍忓拰闈㈠寘灞戜腑灞曠ず鐨勫悕瀛�
+
+    titleSuffix: '2'          褰� path 鍜� title 閲嶅鏃剁殑鍚庣紑鎴栧娉�
+
+    icon: 'svg-name'          璁剧疆璇ヨ矾鐢辩殑鍥炬爣
+
+    noCache: true             濡傛灉璁剧疆涓簍rue锛屽垯涓嶄細琚� <keep-alive> 缂撳瓨(榛樿 false)
+
+    breadcrumb: false         濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず(榛樿 true)
+
+    affix: true               濡傛灉璁剧疆涓簍rue锛屽垯浼氫竴鐩村浐瀹氬湪tag椤逛腑(榛樿 false)
+
+    noTagsView: true          濡傛灉璁剧疆涓簍rue锛屽垯涓嶄細鍑虹幇鍦╰ag涓�(榛樿 false)
+
+    activeMenu: '/home'  鏄剧ず楂樹寒鐨勮矾鐢辫矾寰�
+
+    followAuth: '/home'  璺熼殢鍝釜璺敱杩涜鏉冮檺杩囨护
+
+    canTo: true               璁剧疆涓簍rue鍗充娇hidden涓簍rue锛屼篃渚濈劧鍙互杩涜璺敱璺宠浆(榛樿 false)
+  }
+**/
+declare module 'vue-router' {
+  interface RouteMeta extends Record<string | number | symbol, unknown> {
+    hidden?: boolean
+    alwaysShow?: boolean
+    title?: string
+    titleSuffix?: string
+    icon?: string
+    noCache?: boolean
+    breadcrumb?: boolean
+    affix?: boolean
+    activeMenu?: string
+    noTagsView?: boolean
+    followAuth?: string
+    canTo?: boolean
+  }
+}
+
+type Component<T = any> =
+  | ReturnType<typeof defineComponent>
+  | (() => Promise<typeof import('*.vue')>)
+  | (() => Promise<T>)
+
+declare global {
+  interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
+    name: string
+    meta: RouteMeta
+    component?: Component | string
+    children?: AppRouteRecordRaw[]
+    props?: Recordable
+    fullPath?: string
+    keepAlive?: boolean
+  }
+
+  interface AppCustomRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
+    icon: any
+    name: string
+    meta: RouteMeta
+    component: string
+    componentName?: string
+    path: string
+    redirect: string
+    children?: AppCustomRouteRecordRaw[]
+    keepAlive?: boolean
+    visible?: boolean
+    parentId?: number
+    alwaysShow?: boolean
+  }
+}

--
Gitblit v1.8.0