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

A缓存页面到B不缓存页面,再返回后,页面A不缓存 #19

Open
jardn opened this issue Jun 13, 2020 · 0 comments
Open

A缓存页面到B不缓存页面,再返回后,页面A不缓存 #19

jardn opened this issue Jun 13, 2020 · 0 comments

Comments

@jardn
Copy link

jardn commented Jun 13, 2020

你好,有个问题不知道是我对keep-live了解不深,还是bug,

假设新增一个详情页details.vue,因为不需要缓存,因此meta中的keepAlive为false,点击article列表(keepAlive为true)跳转到详情页,
之后执行,this.$router.go(-1),再返回列表页后,列表页没有缓存。只有当details详情页也设缓存后,列表页才会缓存。

同样,如果一个缓存的页面跳转到另外一个没有缓存的页面,返回后,改缓存的页面也不会缓存。

不清楚是不是bug。

我想到的解决办法就是

详情页details, meta也设为 keepAlive: true,
然后在App.vue 中加上 exclude,这样详情页就不会缓存了

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

1 participant