|
|
|
@ -22,9 +22,9 @@ const mutations = { |
|
|
|
state.visitedViews.push({...view, title}) |
|
|
|
state.visitedViews.push({...view, title}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
addCachedView(state, view) { |
|
|
|
addCachedView(state, view) { |
|
|
|
const {noCache, iframe, isDetailPage} = view.meta || {} |
|
|
|
const {noCache, iframe, usePathKey, useFullPathKey} = view.meta || {} |
|
|
|
|
|
|
|
|
|
|
|
if (noCache || iframe || !view.name && !isDetailPage) return |
|
|
|
if (noCache || iframe || !view.name && !usePathKey && !useFullPathKey) return |
|
|
|
|
|
|
|
|
|
|
|
const key = getCachedViewKey(view) |
|
|
|
const key = getCachedViewKey(view) |
|
|
|
|
|
|
|
|
|
|
|
@ -69,8 +69,8 @@ const actions = { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getCachedViewKey(view) { |
|
|
|
function getCachedViewKey(view) { |
|
|
|
const isDetailPage = view.meta && view.meta.isDetailPage |
|
|
|
const {usePathKey, useFullPathKey} = view.meta || {} |
|
|
|
return isDetailPage ? view.path : view.name |
|
|
|
return usePathKey ? view.path : useFullPathKey ? view.fullPath : view.name |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
|