-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
keep-alive include will also cache anonymous components #6938
Labels
Comments
Closed
cuteyumiko
pushed a commit
to cuteyumiko/vue
that referenced
this issue
Nov 1, 2017
12 tasks
rocka
added a commit
to Rocket1184/electron-netease-cloud-music
that referenced
this issue
Nov 20, 2017
@yyx990803 Now keep-alive will not cache any anonymous components without include prop,it's a bug or a break change? |
The same as @yuu2lee4.You can see the reproduction in the console panel of this link https://jsfiddle.net/tqfc2edq/The vue version 2.5.6, and you can see without "include", all anonymous components can't cahce. only mounted , without activated. |
Fixed in a23b913 |
lovelope
pushed a commit
to lovelope/vue
that referenced
this issue
Feb 1, 2018
This only happens if the component is returned by a intermediate functional or abstract component, e.g. <router-view>. Fix vuejs#6938.
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
This only happens if the component is returned by a intermediate functional or abstract component, e.g. <router-view>. Fix vuejs#6938.
@yyx990803 but what if I need to cache anonymous component, how can I do that? There is no way? Why not to stick with the key passed to it? For example for that case I would expect this component working under keep-alive: But it doesn't. Because it has no name. |
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
This only happens if the component is returned by a intermediate functional or abstract component, e.g. <router-view>. Fix vuejs#6938.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.2
Reproduction link
https://jsfiddle.net/L613xva0/13/
Steps to reproduce
triggle the route
What is expected?
the second route component not be cached
What is actually happening?
the second route component be cached
this demo tow router-view component both have name, the result is right ,
but in this demo, the second route have no name ,but also be cached
when l keep-alive router-view , every anonymous component page will be cached , i don't think is reasonable.
The text was updated successfully, but these errors were encountered: