From a11af0325292b060d086819593ce525d997d2e84 Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Wed, 12 May 2021 17:13:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=90=AF=E5=90=8E?= =?UTF-8?q?=E6=96=AD=E5=90=8E=E9=A1=B5=E9=9D=A2=E7=99=BD=E5=B1=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/permission.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/permission.js b/web/src/permission.js index 07cc154e..69d16e68 100644 --- a/web/src/permission.js +++ b/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) { -- GitLab