还原routes

master
paulGao 2022-09-02 10:42:12 +08:00
parent ed59b389a5
commit fd847944b7
1 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,11 @@ const app = {
// 动态添加主界面路由,需要缓存 // 动态添加主界面路由,需要缓存
updateAppRouter(state, routes) { updateAppRouter(state, routes) {
state.routers.push(...routes); state.routers.push(...routes);
routes.forEach(route => router.addRoute(route)); router.addRoutes(routes);
}, },
// 动态添加全局路由404、500等页面不需要缓存 // 动态添加全局路由404、500等页面不需要缓存
updateDefaultRouter(state, routes) { updateDefaultRouter(state, routes) {
routes.forEach(route => router.addRoute(route)); router.addRoutes(routes);
}, },
setLoading(state, v) { setLoading(state, v) {
state.loading = v; state.loading = v;