Skip to content

Commit

Permalink
fix[TagsView]: fixed CachedView bug (PanJiaChen#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
梁敏华 committed Nov 15, 2019
1 parent 25dddbb commit cdd09ed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/store/modules/tagsView.js
Expand Up @@ -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)
}
}
}
},

Expand Down

0 comments on commit cdd09ed

Please sign in to comment.