小程序进入一个页面,怎么直接定位到页面的最底部?

发布于 6 年前作者 xiangfang4919 次浏览最后编辑 6 年前来自 issues

小程序进入一个页面,怎么直接定位到页面的最底部?

2 回复
jun47
jun471 楼6 年前

文档https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html,考虑设置scroll-top(竖向滚动条位置)的值


guiying69
guiying692 楼4 年前

https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html

wx.pageScrollTo({
  selector: '#end',
  duration: 100
})