mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Sticky: incorrect position when inside scroll container (#4055)
This commit is contained in:
parent
1e9fe3fea6
commit
40423d1f28
@ -62,7 +62,7 @@ export default createComponent({
|
|||||||
this.height = this.$el.offsetHeight;
|
this.height = this.$el.offsetHeight;
|
||||||
|
|
||||||
const { container, offsetTop } = this;
|
const { container, offsetTop } = this;
|
||||||
const scrollTop = getScrollTop(this.scroller);
|
const scrollTop = getScrollTop(window);
|
||||||
const topToPageTop = getElementTop(this.$el);
|
const topToPageTop = getElementTop(this.$el);
|
||||||
|
|
||||||
const emitScrollEvent = () => {
|
const emitScrollEvent = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user