Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法为异步路由组件新增loading状态及error状态 #3249

Closed
PakTo opened this issue Jun 30, 2020 · 1 comment
Closed

无法为异步路由组件新增loading状态及error状态 #3249

PakTo opened this issue Jun 30, 2020 · 1 comment

Comments

@PakTo
Copy link

PakTo commented Jun 30, 2020

Version

3.3.4

Reproduction link

https://gitee.com/chawpakto/VueAsyncLoadRouteDemo

Steps to reproduce

在Vue官方文档中的 异步组件 - 处理加载状态 的案例,为异步组件添加Loading过渡组件及Error错误组件

What is expected?

Loading组件及Error组件能正常为异步路由组件进行加载过渡及错误处理显示

What is actually happening?

在实际生成的页面中,Loading及Error组件无法正常作用于异步组件的加载过渡及错误处理

@posva
Copy link
Member

posva commented Jun 30, 2020

See #2140
I would avoid using the async factory with vue router because it won't display while the router is waiting for navigation guards. It will only wait after the navigation is confirmed, to fetch the chunk of the page

@posva posva closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants