1.html
<view id="bottom"></view>
2.
onReady: function () { //滚动到底部 let query = wx.createSelectorQuery(); query.select('#bottom').boundingClientRect(); // 执行查询 query.exec(ele => { let e = ele[0]; wx.pageScrollTo({ scrollTop: e.top, }); }) },
1.html
<view id="bottom"></view>
2.
onReady: function () { //滚动到底部 let query = wx.createSelectorQuery(); query.select('#bottom').boundingClientRect(); // 执行查询 query.exec(ele => { let e = ele[0]; wx.pageScrollTo({ scrollTop: e.top, }); }) },
转载于:https://www.cnblogs.com/guangzhou11/p/10060117.html