From 7a5803551419f65ca55ba797b49273b3a0dc6067 Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 16 Nov 2022 23:46:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20add=20router-page.d.ts=20to=20?= =?UTF-8?q?git=20[=E5=B0=86router-page.d.ts=E6=B7=BB=E5=8A=A0git=E6=8F=90?= =?UTF-8?q?=E4=BA=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - src/typings/router-page.d.ts | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/typings/router-page.d.ts diff --git a/.gitignore b/.gitignore index 872102ee2..1f0bea9af 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,5 @@ stats.html *.sw? /src/typings/components.d.ts -/src/typings/router-page.d.ts package-lock.json yarn.lock diff --git a/src/typings/router-page.d.ts b/src/typings/router-page.d.ts new file mode 100644 index 000000000..3f4dd3a1c --- /dev/null +++ b/src/typings/router-page.d.ts @@ -0,0 +1,67 @@ +declare namespace RouterPage { + /** 根路由 */ + type RootRouteKey = 'root'; + + /** 未找到路由(捕获无效路径的路由) */ + type NotFoundRouteKey = 'not-found'; + + /** 页面路由 */ + type RouteKey = + | '403' + | '404' + | '500' + | 'about' + | 'auth-demo' + | 'auth-demo_permission' + | 'auth-demo_super' + | 'component' + | 'component_button' + | 'component_card' + | 'component_table' + | 'constant-page' + | 'dashboard' + | 'dashboard_analysis' + | 'dashboard_workbench' + | 'document' + | 'document_naive' + | 'document_project' + | 'document_project-link' + | 'document_vite' + | 'document_vue' + | 'exception' + | 'exception_403' + | 'exception_404' + | 'exception_500' + | 'function' + | 'function_tab' + | 'function_tab-detail' + | 'function_tab-multi-detail' + | 'login' + | 'management' + | 'management_auth' + | 'management_role' + | 'management_route' + | 'management_user' + | 'multi-menu' + | 'multi-menu_first' + | 'multi-menu_first_second' + | 'multi-menu_first_second-new' + | 'multi-menu_first_second-new_third' + | 'not-found' + | 'plugin' + | 'plugin_charts' + | 'plugin_charts_antv' + | 'plugin_charts_echarts' + | 'plugin_copy' + | 'plugin_editor' + | 'plugin_editor_markdown' + | 'plugin_editor_quill' + | 'plugin_icon' + | 'plugin_map' + | 'plugin_print' + | 'plugin_swiper' + | 'plugin_video'; + + /** 最后一级路由(该级路有对应的vue文件) */ + type LastDegreeRouteKey = Extract +}