404不再全屏展示 方便退出和修改配置

This commit is contained in:
pixel
2020-05-15 14:45:14 +08:00
parent dc27fe21b2
commit fa50c11a67
3 changed files with 12 additions and 8 deletions

View File

@@ -37,11 +37,20 @@ export const router = {
}]
const asyncRouterRes = await asyncMenu()
const asyncRouter = asyncRouterRes.data.menus
asyncRouter.push({
path: "404",
name: "404",
hidden: true,
meta: {
title: "迷路了*。*",
},
component: 'view/error/index.vue'
})
formatRouter(asyncRouter)
baseRouter[0].children = asyncRouter
baseRouter.push({
path: '*',
redirect: '/404'
redirect: '/layout/404'
})
asyncRouterHandle(baseRouter)