when writing more loads for Mini Program, there will be a problem that the page goes back to the top
with scroll-view
regardless of whether it is
var data = res.data.data
var listData = utils.obtain (data)
var cur = wx.getStorageSync ("cur")-1
listData.forEach (e = > {
self.data.newList[cur].push(e)
})
self.setData ({
[cw]: self.data.newList[cur]
})
or
self.setData ({
[cw]: self.data.newList[cur].concat(listData)
})
pages all go back to the top
< swiper-item wx:for= "{{newList}}" wx:key= "* this" wx:for-index="index" >
< scroll-view scroll-y= "true" bindscrolltolower= "bindDownLoad" scroll-top= "500px" class= "scoll-h" >
-- < view > {{newList [index]}} < / view >-->
< view wx:for= "{newList [index]} wx:for-item=" item "wx:key=" articles "wx:for-index="articlesindex" class="newscontent" >
< template is=" list "data=" {item, Articlesindex}} "> < / template >
< / view >
< / scroll-view >
< / swiper-item >
this is the page code. I hope someone can take a look at it