From 134d10fa75a964e0a993f588824e7f0631673030 Mon Sep 17 00:00:00 2001 From: zhuqunfeng Date: Wed, 12 Feb 2025 15:03:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=8A=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.d.ts | 3 +- src/components/layout/table/TbSubmenu.vue | 47 +++++++++++------------ src/main.ts | 3 +- src/router/staticRouter.ts | 39 ------------------- src/utils/global.ts | 1 + 5 files changed, 26 insertions(+), 67 deletions(-) delete mode 100644 src/router/staticRouter.ts diff --git a/env.d.ts b/env.d.ts index df437a6..7a68783 100644 --- a/env.d.ts +++ b/env.d.ts @@ -10,7 +10,6 @@ declare interface ImportMetaEnv { readonly VITE_BASE_API: string readonly VITE_EDITOR_URL: string } - declare interface ImportMeta { readonly env: ImpoertMetaEnv -} \ No newline at end of file +} diff --git a/src/components/layout/table/TbSubmenu.vue b/src/components/layout/table/TbSubmenu.vue index a24ad4e..afb27df 100644 --- a/src/components/layout/table/TbSubmenu.vue +++ b/src/components/layout/table/TbSubmenu.vue @@ -1,29 +1,28 @@ - \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 782bd7a..85f3dbf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,8 +10,7 @@ import globalProperties from './utils/globalProperties' import hasPermission from './utils/hasPermission' const app = createApp(App) -app.use(globalProperties) -app.use(router) +app.use(router).use(globalProperties) app.use(ElementPlus,{ locale: zhCn, size: 'default', diff --git a/src/router/staticRouter.ts b/src/router/staticRouter.ts deleted file mode 100644 index a328bee..0000000 --- a/src/router/staticRouter.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default [ - { - path: '/', - redirect: 'login', - }, - { - path: '/login', - name: 'login', - meta: {title: "登录"}, - component: () => import("@/views/common/Login.vue"), - }, - { - path: '/404', - name: '404', - meta: {title: "404"}, - component: () => import('@/views/common/404.vue') - }, - { - path: '/500', - name: '500', - meta: {title: "500"}, - component: () => import('@/views/common/500.vue') - }, - { - path: '/index', - name: 'index', - meta: { title: "首页" }, - redirect: '/index/home', - component: () => import("@/components/layout/Index.vue"), - children: [ - { - path: 'home', - name: 'Home', - meta: { title: "首页" }, - component: () => import('@/views/home/Home.vue') - } - ] - } -] \ No newline at end of file diff --git a/src/utils/global.ts b/src/utils/global.ts index ead57c7..128ca31 100644 --- a/src/utils/global.ts +++ b/src/utils/global.ts @@ -8,4 +8,5 @@ export default { info: {}, authorities: [], }, + visitedViews:[] }