[Bugfix] 修复tab返回时无法选中的问题

This commit is contained in:
ibuler
2020-04-30 16:24:41 +08:00
parent efc780abdd
commit 6cf36a4440
2 changed files with 16 additions and 4 deletions

View File

@@ -82,7 +82,6 @@ export default {
} }
return { return {
loading: true, loading: true,
activeName: this.activeMenu,
validActions: Object.assign(defaultActions, this.actions) validActions: Object.assign(defaultActions, this.actions)
} }
}, },
@@ -105,6 +104,14 @@ export default {
}, },
validTitle() { validTitle() {
return this.title || this.getTitle(this.object) return this.title || this.getTitle(this.object)
},
activeName: {
get() {
return this.activeMenu
},
set(item) {
this.activeName = item
}
} }
}, },
async mounted() { async mounted() {

View File

@@ -35,9 +35,14 @@ export default {
required: true required: true
} }
}, },
data() { computed: {
return { activeName: {
activeName: this.activeMenu get() {
return this.activeMenu
},
set(item) {
this.activeName = item
}
} }
}, },
methods: { methods: {