mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-31 03:49:46 +08:00
fix[TagsView]: fixed CachedView bug (PanJiaChen#406)
This commit is contained in:
parent
25dddbbce8
commit
cdd09ed943
@ -15,7 +15,12 @@ const mutations = {
|
||||
ADD_CACHED_VIEW: (state, view) => {
|
||||
if (state.cachedViews.includes(view.name)) return
|
||||
if (!view.meta.noCache) {
|
||||
state.cachedViews.push(view.name)
|
||||
for (const matchedView of view.matched) {
|
||||
const { name } = matchedView.components.default
|
||||
if (name && state.cachedViews.indexOf(name) === -1) {
|
||||
state.cachedViews.push(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user