Commit 53795100 authored by Pan's avatar Pan

refine tabsview

parent f712d468
......@@ -19,7 +19,12 @@ export default {
closeViewTabs(view, $event) {
this.$store.dispatch('delVisitedViews', view).then((views) => {
if (this.isActive(view.path)) {
this.$router.push(views.pop().path)
const latestView = views.slice(-1)[0]
if (latestView) {
this.$router.push(latestView.path)
} else {
this.$router.push('/')
}
}
})
$event.preventDefault()
......
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