master
parent
4bddd5b24f
commit
f648363d31
|
|
@ -60,8 +60,7 @@ const router = function () {
|
||||||
|
|
||||||
router.beforeEach((to, from) => {
|
router.beforeEach((to, from) => {
|
||||||
const appUserStore = useAppUserStore()
|
const appUserStore = useAppUserStore()
|
||||||
const name = <string>to.name
|
const name = to.name as string
|
||||||
|
|
||||||
// 已登录
|
// 已登录
|
||||||
if (appUserStore.isAuthenticated) {
|
if (appUserStore.isAuthenticated) {
|
||||||
if (from.path === '/' && router.getRoutes().length <= 4) {// 浏览器刷新
|
if (from.path === '/' && router.getRoutes().length <= 4) {// 浏览器刷新
|
||||||
|
|
@ -87,26 +86,6 @@ router.beforeEach((to, from) => {
|
||||||
return false
|
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
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
// ------
|
// ------
|
||||||
// Generated by unplugin-vue-components
|
// Generated by unplugin-vue-components
|
||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
import { GlobalComponents } from 'vue'
|
|
||||||
|
|
||||||
export {}
|
export {}
|
||||||
|
|
||||||
|
|
@ -59,6 +58,7 @@ declare module 'vue' {
|
||||||
ElText: typeof import('element-plus/es')['ElText']
|
ElText: typeof import('element-plus/es')['ElText']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||||
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|
@ -118,8 +118,9 @@ declare global {
|
||||||
const ElText: typeof import('element-plus/es')['ElText']
|
const ElText: typeof import('element-plus/es')['ElText']
|
||||||
const ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
const ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
const ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
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 ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
const ElUpload: typeof import('element-plus/es')['ElUpload']
|
const ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
const RouterLink: typeof import('vue-router')['RouterLink']
|
const RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
const RouterView: typeof import('vue-router')['RouterView']
|
const RouterView: typeof import('vue-router')['RouterView']
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue