We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.5.2
https://github.com/lf541512/vue-keep-alive-test
1.用keep-alive包装router-view <keep-alive include="home"> <router-view></router-view> </keep-alive>
<keep-alive include="home"> <router-view></router-view> </keep-alive>
2.新建Home和Count两个组件,其中Count不指定name,为组件添加created 和activated生命周期函数
3.添加路由路径和跳转链接
按照文档中对keep-alive的匹配规则描述,对匿名组件是不会缓存的 每次重新进入Count组件时,都会调用其created 函数
从console输出可以看到,重新进入Count组件时,调用了其activated而不是created ,可见是缓存了这个匿名组件,当给Count指定一个name时,就不会匹配上缓存这个组件。 这是feature还是bug?或者是我的用法不对?
The text was updated successfully, but these errors were encountered:
Could you translate in English?
Sorry, something went wrong.
somebody translate this in English at #6938
Then we close this in favour of #6938
No branches or pull requests
Version
2.5.2
Reproduction link
https://github.com/lf541512/vue-keep-alive-test
Steps to reproduce
1.用keep-alive包装router-view
<keep-alive include="home"> <router-view></router-view> </keep-alive>
2.新建Home和Count两个组件,其中Count不指定name,为组件添加created 和activated生命周期函数
3.添加路由路径和跳转链接
What is expected?
按照文档中对keep-alive的匹配规则描述,对匿名组件是不会缓存的
每次重新进入Count组件时,都会调用其created 函数
What is actually happening?
从console输出可以看到,重新进入Count组件时,调用了其activated而不是created ,可见是缓存了这个匿名组件,当给Count指定一个name时,就不会匹配上缓存这个组件。
这是feature还是bug?或者是我的用法不对?
The text was updated successfully, but these errors were encountered: