diff --git a/packages/tabs/index.vue b/packages/tabs/index.vue index 2ac2cce03..6cbea44db 100644 --- a/packages/tabs/index.vue +++ b/packages/tabs/index.vue @@ -107,7 +107,7 @@ export default create({ // scroll to correct position if (this.position === 'page-top' || this.position === 'content-bottom') { - scrollUtils.setScrollTop(this.scrollEl, scrollUtils.getElementTop(this.$el)); + scrollUtils.setScrollTop(window, scrollUtils.getElementTop(this.$el)); } }, @@ -196,7 +196,7 @@ export default create({ // adjust tab position onScroll() { - const scrollTop = scrollUtils.getScrollTop(this.scrollEl); + const scrollTop = scrollUtils.getScrollTop(window); const elTopToPageTop = scrollUtils.getElementTop(this.$el); const elBottomToPageTop = elTopToPageTop + this.$el.offsetHeight - this.$refs.wrap.offsetHeight; if (scrollTop > elBottomToPageTop) {