Skip to content

uList控件滑动bug #149

@Jerry930326

Description

@Jerry930326

版本

2.0.10

转载链接

www.uviewui.com

重现步骤

2个bug,步骤:
1、布局使用 <u-list><u-list-item v-for></u-list-item></u-list> 嵌套
2、初始化10条数据。
3、滑动到底部使用 @scrolltolower 事件加载更多回调新增10条数据。
4、【Bug 1】加载更多后继续向下滑动,在第11条数据上滑时,会发生数据错位,第11条数据滑动到顶部再向上偏移一点时会瞬间变成第10条数据。
5、【Bug 2】页面滑动到顶部,会继续收到 @scrolltolower 事件加载更多回调。

期望的结果是什么?

1、数据不发生错乱。
2、滑动到顶部不会收到 @scrolltolower 事件。

实际的结果是什么?

1、数据错乱。
2、滑动到顶部也会收到 @scrolltolower 事件。


请看2.0.10中u-list源码的 scrolltoupper()方法中你们写的代码,也发送scrolltolower事件,注释还写虎狼之词。。。。

// #ifndef APP-NVUE
// 滚动到底部时触发,非nvue有效
scrolltoupper(e) {
uni.$u.sleep(30).then(() => {
this.$emit('scrolltolower')
// 这一句很重要,能绝对保证在性功能障碍的webview,滚动条到顶时,取消偏移值,让页面置顶
this.offset = 0
})
}
// #endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions