[improvement] Tab: scroll to correct position when use offset-top (#2873)

This commit is contained in:
neverland 2019-02-28 19:53:36 +08:00 committed by GitHub
parent b99d7f9c06
commit 60b5e188c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ export default sfc({
// scroll to correct position
if (this.position === 'top' || this.position === 'bottom') {
setScrollTop(window, getElementTop(this.$el));
setScrollTop(window, getElementTop(this.$el) - this.offsetTop);
}
},