Skip to content

Commit

Permalink
fix: 页面示例不存在错误
Browse files Browse the repository at this point in the history
  • Loading branch information
vfiee authored and bhuh12 committed Dec 17, 2021
1 parent f33099f commit 2a6265d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/mixins/pageLeave.js
Expand Up @@ -62,8 +62,12 @@ export default {

// 未开启缓存时,获取当前页面组件实例
if (!vm && this.activeTabId === id) {
vm = this.$route.matched[this.$alive.routeMatch.routeIndex].instances
.default
try {
vm = this.$route.matched[this.$alive.routeMatch.routeIndex].instances
.default
} catch (_) {
vm = null
}
}

if (!vm || !tab) return
Expand Down

0 comments on commit 2a6265d

Please sign in to comment.