fixed:#1336 (#1337)

This commit is contained in:
奇淼(piexlmax
2023-01-14 10:27:07 +08:00
committed by GitHub
parent 24215f8b28
commit dfcb283899
2 changed files with 6 additions and 6 deletions
+3
View File
@@ -47,6 +47,7 @@ const KeepAliveFilter = (routes) => {
export const useRouterStore = defineStore('router', () => {
const keepAliveRouters = ref([])
const asyncRouterFlag = ref(0)
const setKeepAliveRouters = (history) => {
const keepArrTemp = []
history.forEach(item => {
@@ -63,6 +64,7 @@ export const useRouterStore = defineStore('router', () => {
const routeMap = ({})
// 从后台获取动态路由
const SetAsyncRouter = async() => {
asyncRouterFlag.value++
const baseRouter = [{
path: '/layout',
name: 'layout',
@@ -114,6 +116,7 @@ export const useRouterStore = defineStore('router', () => {
asyncRouters,
routerList,
keepAliveRouters,
asyncRouterFlag,
SetAsyncRouter,
routeMap
}