防止空路由出现的警告,设置默认path=/

This commit is contained in:
RuoYi
2020-05-26 18:22:53 +08:00
parent bb1324a70a
commit b5c789a267
2 changed files with 1 additions and 5 deletions

View File

@ -32,10 +32,6 @@ const permission = {
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap) {
return asyncRouterMap.filter(route => {
if(!route.path){
// 防止空路由出现的警告设置默认path
route.path = '/path';
}
if (route.component) {
// Layout组件特殊处理
if (route.component === 'Layout') {