-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Suspense regression when used with RouterView #2143
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
Comments
Probably related to the rendered component being nested. The component is displayed if the |
You mean if we use |
I have the same issue |
Similar to <router-view v-slot="{ Component }">
<suspense>
<component :is="Component"/>
</suspense>
</router-view> |
|
Fixed:
|
为什么 loading 不会出现呢? |
Now it shows the |
https://v3.vuejs.org/guide/migration/suspense.html#:~:text=Vue%20Router%20has,the%20usual%20way. |
The slot-based-syntax example in the router docs referenced by @yyx990803 above shows a Edit: found that adding |
I've added keep-alive and it's not working because of this extra div. |
Version
3.0.0-rc.12
Reproduction link
https://jsfiddle.net/vmprxysu/
Steps to reproduce
Consider a component like the following:
with a router config loading an async component
What is expected?
In rc.10, we see the loading indicator and then the async component is displayed
What is actually happening?
In rc.12 nothing is displayed. Is this expected with the recent changes or is it a regression?
The text was updated successfully, but these errors were encountered: