|
@@ -167,9 +167,10 @@ export default {
|
|
|
this.replaceTab(newVal, oldVal)
|
|
|
// 从列表打开新增,编辑
|
|
|
this.$store.state.app.isNewTab = na || nb || nc
|
|
|
- // 从编辑,新增返回列表
|
|
|
+ // 从编辑,新增返回列表,刷新列表
|
|
|
this.$store.state.app.updateList = ob || oc
|
|
|
} else {
|
|
|
+ // 新打开的页签
|
|
|
this.tabsList.push(newVal.name)
|
|
|
this.pages.push(newVal)
|
|
|
this.pagesRecordList.push(newVal.name)
|
|
@@ -182,24 +183,10 @@ export default {
|
|
|
this.$store.state.app.isNewTab = false
|
|
|
console.log(1, '已存在')
|
|
|
}
|
|
|
- // 父页面(列表)进入子页面(编辑、详情)再返回至父页面时关闭子页面页签 子页面点击“返回列表”
|
|
|
- // if (oldVal && oldVal.name && newVal.query.closeLastOldTab) {
|
|
|
- // if (oldVal.name.indexOf('List') == -1) { // 要关闭的页面不能是列表页
|
|
|
- // this.remove(oldVal.name) // 关闭子页面
|
|
|
- // this.$store.state.app.isNewTab = !(oldVal.meta.title.indexOf('详情') >= 0)
|
|
|
- // }
|
|
|
- // }
|
|
|
this.activeKey = newVal.name
|
|
|
},
|
|
|
activeKey: function (newPathKey) {
|
|
|
this.$router.push({ name: newPathKey })
|
|
|
- // const row = this.pages.find(item => item.name == newPathKey)
|
|
|
- // if (row.fullPath.indexOf('/list') == -1) {
|
|
|
- // this.$router.push({ path: row.fullPath })
|
|
|
- // } else {
|
|
|
- // // this.$router.push({ path: row.fullPath, query: { closeLastOldTab: true } }) // 需求:切换页签需关掉子页面
|
|
|
- // this.$router.push({ path: row.path }) // 需求:切换页签不需关掉子页面
|
|
|
- // }
|
|
|
}
|
|
|
},
|
|
|
render () {
|