Prechádzať zdrojové kódy

修复重启后断后页面白屏问题

pixel 3 rokov pred
rodič
commit
a11af03252
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  1. 1 3
      web/src/permission.js

+ 1 - 3
web/src/permission.js

@@ -24,9 +24,7 @@ router.beforeEach(async (to, from, next) => {
                 asyncRouterFlag++
                 await store.dispatch('router/SetAsyncRouter')
                 const asyncRouters = store.getters['router/asyncRouters']
-                asyncRouters.forEach(item => {
-                    router.addRoute(item)
-                })
+                router.addRoutes(asyncRouters)
                 next({ ...to, replace: true })
             } else {
                 if (to.matched.length) {