我有一个/home的路由但是访问/home/anything时页面是空白的,怎么能实现访问/home/anything时让它重定向到/home或者404 #11952
Replies: 3 comments 2 replies
-
export default defineConfig({ 好像publicPath是undefined的时候是正常的,有值就没法走404了 |
Beta Was this translation helpful? Give feedback.
-
routes配置:
|
Beta Was this translation helpful? Give feedback.
-
第一种方式是直接在路由 第二种方式是给它写一个自己的组件,在这个组件里使用 |
Beta Was this translation helpful? Give feedback.
-
我有一个/home的路由但是访问/home/anything时页面是空白的,怎么能实现访问/home/anything时让它重定向到/home或者404
Beta Was this translation helpful? Give feedback.
All reactions