Commit 32d7a0f7 by 李少勇

处理刷新浏览器页签不显示问题

parent d67357d0
......@@ -297,6 +297,21 @@ export default {
return newObj;
},
setDefaultTabs() {
// 处理刷新页签不显示问题
let curRoute = this.$route
let flag = this.defaultTabList.some((item) => {
return item.path == curRoute.path
})
if (curRoute.meta.keepAlive && !flag) {
this.defaultTabList.push({
name: curRoute.name,
path: curRoute.fullPath,
text: curRoute.meta.title || 'no-title',
hidden: false,
routePath: curRoute.path,
routeName: curRoute.name
})
}
// 页签拷贝
this.defaultTabList.forEach((item, index) => {
let newItem = this.deepCloneObj(item);
......
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