[bugfix] Tabs: fix scroll position deviation when sticky (#3949)

This commit is contained in:
neverland 2019-07-24 17:59:01 +08:00 committed by GitHub
parent 43e0bd0123
commit 632e4c1d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ export default createComponent({
// scroll to correct position
if (this.stickyFixed) {
setRootScrollTop(getElementTop(this.$el) - this.offsetTop);
setRootScrollTop(Math.ceil(getElementTop(this.$el) - this.offsetTop));
}
}
},