Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.9k views
in Technique[技术] by (71.8m points)

vue添加菜单的时候如果路径错误,那么整个项目白屏

就是说我的菜单是由后台返回给我的,一旦我添加菜单的路径错误,那么整个项目就白屏了,而我不能去添加菜单的页面修改正确的路径,
现在我想如果我添加错误了,我还可以进去修改菜单的界面,把这个错误的路径改正确

image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

路由添加,错误之后直接跳指定页

{
  path: '*',
  redirect: '/404'
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...