scroll-view的bindscrolltolower触发加载更多后,列表自动回滚到顶部?

小程序 文章 2021-03-19 19:01 666 0 全屏看文

AI助手支持GPT4.0

scroll-view的bindscrolltolower触发加载更多后,列表自动回滚到顶部?After scroll-view's bindscrolltolower triggers to load more, the list automatically rolls back to the top?

scroll-view的bindscrolltolower触发加载更多后,列表自动回滚到顶部?

第一次碰到,之前的项目还好好的,bindscrolltolower触发加载更多,然后ajax拿到的数据和之前已有的数据合并(追加到原数据后),页面会有一个刷新的情况出现,列表会自动回滚到顶部,而不是我刚才拖拽到的位置。

有谁知道咋解决么

For the first time, the previous project is still in good condition. Bindscroll tower triggers to load more data. Then the data obtained by AJAX is merged with the existing data (added to the original data). A refresh will appear on the page, and the list will be automatically rolled back to the top instead of the position I just dragged. Does anyone know how to solve it

回答:

社区技术运营专员-Riven:

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

😮😮:

代码片段~

站住、举手:

看下代码

-EOF-

AI助手支持GPT4.0