main.vue文件
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
computed: {
key () {
return this.$route.fullPath//this.$route.path
},
}
main.vue文件
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
computed: {
key () {
return this.$route.fullPath//this.$route.path
},
}