Unverified Commit f5c98035 by Sendya

fix: fail & success page in mutil-tab switch error

parent 274784cf
......@@ -6,7 +6,6 @@ export default {
},
render () {
const { $route: { meta }, $store: { getters } } = this
const inKeep = (
<keep-alive>
<router-view />
......@@ -18,7 +17,10 @@ export default {
// 这里增加了 multiTab 的判断,当开启了 multiTab 时
// 应当全部组件皆缓存,否则会导致切换页面后页面还原成原始状态
// 若确实不需要,可改为 return meta.keepAlive ? inKeep : notKeep
return meta.keepAlive || getters.multiTab ? inKeep : notKeep
if (meta.keepAlive === false) {
return notKeep
}
return getters.multiTab || meta.keepAlive ? inKeep : notKeep
}
}
</script>
......@@ -197,13 +197,13 @@ export const asyncRouterMap = [
path: '/result/success',
name: 'ResultSuccess',
component: () => import(/* webpackChunkName: "result" */ '@/views/result/Success'),
meta: { title: '成功', hiddenHeaderContent: true, permission: [ 'result' ] }
meta: { title: '成功', keepAlive: false, hiddenHeaderContent: true, permission: [ 'result' ] }
},
{
path: '/result/fail',
name: 'ResultFail',
component: () => import(/* webpackChunkName: "result" */ '@/views/result/Error'),
meta: { title: '失败', hiddenHeaderContent: true, permission: [ 'result' ] }
meta: { title: '失败', keepAlive: false, hiddenHeaderContent: true, permission: [ 'result' ] }
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment