Skip to content

bug: scrollToBottom可能会导致无限循环执行 #13

Open
@joyexpr

Description

@joyexpr

bug: scrollToBottom可能会导致无限循环执行,导致列表一直在底部无法向上拉

tangbc/vue-virtual-scroll-list@feb2135

setTimeout(() => {
          if (this.getOffset() + this.getClientSize()  < this.getScrollSize()) {
            this.scrollToBottom()
          }
        }, 3)

应该改为

setTimeout(() => {
          if (this.getOffset() + this.getClientSize() + 1 < this.getScrollSize()) {
            this.scrollToBottom()
          }
        }, 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions