refine tabsview
This commit is contained in:
parent
f712d4682e
commit
5379510013
1 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue