mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +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
|
// scroll to correct position
|
||||||
if (this.position === 'top' || this.position === 'bottom') {
|
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