uniapp scroll-view距离不足自动滚动
时间: 2023-08-21 10:06:19 浏览: 128
scrollView自动滚动
5星 · 资源好评率100%
根据引用的内容,uniapp的scroll-view组件在实现区域滚动时,需要计算准确的高度,并设置scroll-y属性为true才能实现竖向滚动。如果scroll-view距离不足以自动滚动,可能是由于高度的设置不正确导致的。需要确保设置了适当的高度,比如使用像素单位(px)而不是百分比。参考 [3
另外,一种解决方案是使用swiper组件配合scroll-view来实现区域滚动,并且设置swiper组件的高度与屏幕高度一致。这是一种简单直接且好用的方法。参考<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [uni-app scroll-view自适应滚动](https://blog.csdn.net/m0_57068257/article/details/131988331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [uniapp:swiper+scroll-view自适应高度和滚动](https://blog.csdn.net/qq_36126031/article/details/113113981)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [微信小程序-scroll-view滚动到指定位置(类似锚点)](https://download.csdn.net/download/weixin_38601878/16213063)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文