diff --git a/packages/common/Affix/src/main.vue b/packages/common/Affix/src/main.vue index 5631d017d..9c550e812 100644 --- a/packages/common/Affix/src/main.vue +++ b/packages/common/Affix/src/main.vue @@ -74,7 +74,9 @@ export default { const { top } = this.$el.getBoundingClientRect() - this.memorizedTop = top + const containerScrollTop = this.container.scrollTop + const delta = containerScrollTop - this.top + this.memorizedTop = top + delta }, handleScroll (e) { const containerEl = this.container.nodeName === '#document' ? this.container.documentElement : this.container