Vue3+ts项目打包后,RouterView组件不加载,而在run dev模式下会自动加载 #11743
Unanswered
czmCWH
asked this question in
Help/Questions
Replies: 3 comments 1 reply
-
Could you show your routes and createRouter? And try using |
Beta Was this translation helpful? Give feedback.
1 reply
-
我也遇到你这种情况,使用component: () => import("@/views/primary-industry/index.vue")就能解决 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@zhyq997 你是用 vscode 的 Live Server 插件运行打包文件的吗,第一次运行的时候 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
vue3+ts项目打包后,我用 VS code的 Live Server 插件运行打包文件。
2中的RouterView组件不会自动加载根路由显示;必须通过1中的 RouterLink 标签切换才能显示路由的页面。
有啥办法让它直接显示RouterView ?是哪里需要配置吗
Beta Was this translation helpful? Give feedback.
All reactions