mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[improvement] Tab: scroll to correct position when use offset-top (#2873)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user