Pan 7 anni fa
parent
commit
6a7124bf9c
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/main.js

+ 2 - 2
src/main.js

@@ -27,8 +27,8 @@ router.beforeEach((to, from, next) => {
27 27
         store.dispatch('GetInfo').then(res => {
28 28
           const roles = res.data.role;
29 29
           store.dispatch('GenerateRoutes', { roles }).then(() => {
30
-            router.addRoutes(store.getters.addRouters)
31
-            next(Object.assign({}, to));
30
+            router.addRoutes(store.getters.addRouters);
31
+            next({ ...to });
32 32
           })
33 33
         })
34 34
       } else {