Преглед изворни кода

无法匹配到的页面返回跳转至404页,防止整个页面显示空白

RuoYi пре 5 година
родитељ
комит
bc827ef377
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      ruoyi-ui/src/router/index.js

+ 2 - 1
ruoyi-ui/src/router/index.js

@@ -93,7 +93,8 @@ export const constantRoutes = [
         meta: { title: '修改生成配置' }
       }
     ]
-  }
+  },
+  { path: '*', redirect: '/404', hidden: true }
 ]
 
 export default new Router({