Skip to content

Commit

Permalink
fix(scroll): 解决页签滚动调整时未获取到当前页签报错
Browse files Browse the repository at this point in the history
  • Loading branch information
bhuh12 committed Nov 28, 2020
1 parent 665b897 commit 61e3a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mixins/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
const { scroll } = this.$refs
const cur = this.$el.querySelector('.router-tab__item.is-active')

if (scroll && !scroll.isInView(cur)) scroll.scrollIntoView(cur)
if (scroll && cur && !scroll.isInView(cur)) scroll.scrollIntoView(cur)

// 关闭右键菜单
this.hideContextmenu()
Expand Down

0 comments on commit 61e3a95

Please sign in to comment.