diff --git a/src/common/router/index.ts b/src/common/router/index.ts index 52e9666..4c94909 100644 --- a/src/common/router/index.ts +++ b/src/common/router/index.ts @@ -60,8 +60,7 @@ const router = function () { router.beforeEach((to, from) => { const appUserStore = useAppUserStore() - const name = to.name - + const name = to.name as string // 已登录 if (appUserStore.isAuthenticated) { if (from.path === '/' && router.getRoutes().length <= 4) {// 浏览器刷新 @@ -87,26 +86,6 @@ router.beforeEach((to, from) => { return false } }) - /* const succ = reloadRouter() - if (!succ - && SpecialPage.Login !== name - && SpecialPage.Home !== name - && SpecialPage.Main !== name - && SpecialPage.NotFound !== name) { - return { - replace: true, - name: SpecialPage.Home, - } - } else { - let routeName = router.getRoutes().find((it) => it.path === to.path)?.name as string - if (Strings.isBlank(routeName)) { - routeName = SpecialPage.Home - } - setTimeout(() => { - Evt.emit('browserReflash', routeName) - }) - return false - } */ } return true } diff --git a/src/dts/components.d.ts b/src/dts/components.d.ts index a2bf8af..226ef58 100644 --- a/src/dts/components.d.ts +++ b/src/dts/components.d.ts @@ -5,7 +5,6 @@ // ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -import { GlobalComponents } from 'vue' export {} @@ -59,6 +58,7 @@ declare module 'vue' { ElText: typeof import('element-plus/es')['ElText'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTransfer: typeof import('element-plus/es')['ElTransfer'] + ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] RouterLink: typeof import('vue-router')['RouterLink'] @@ -118,8 +118,9 @@ declare global { const ElText: typeof import('element-plus/es')['ElText'] const ElTooltip: typeof import('element-plus/es')['ElTooltip'] const ElTransfer: typeof import('element-plus/es')['ElTransfer'] + const ElTree: typeof import('element-plus/es')['ElTree'] const ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] const ElUpload: typeof import('element-plus/es')['ElUpload'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] -} \ No newline at end of file +}