|
@@ -64,12 +64,13 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (to.path === '/login') {
|
|
if (to.path === '/login') {
|
|
|
next({ path: '/' })
|
|
next({ path: '/' })
|
|
|
} else {
|
|
} else {
|
|
|
- // 获取所有字典
|
|
|
|
|
const dictStore = useDictStoreWithOut()
|
|
const dictStore = useDictStoreWithOut()
|
|
|
const userStore = useUserStoreWithOut()
|
|
const userStore = useUserStoreWithOut()
|
|
|
const permissionStore = usePermissionStoreWithOut()
|
|
const permissionStore = usePermissionStoreWithOut()
|
|
|
|
|
+ // 异步加载字典
|
|
|
|
|
+ // 另外,间接 issue:https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/ID9FLI
|
|
|
if (!dictStore.getIsSetDict) {
|
|
if (!dictStore.getIsSetDict) {
|
|
|
- await dictStore.setDictMap()
|
|
|
|
|
|
|
+ dictStore.setDictMap().then()
|
|
|
}
|
|
}
|
|
|
if (!userStore.getIsSetUser) {
|
|
if (!userStore.getIsSetUser) {
|
|
|
isRelogin.show = true
|
|
isRelogin.show = true
|