问题截图
input聚焦
失去焦点后马上滑动页面
解决办法
只需要在view加上catchtouchmove='true’即可
弹窗元素设置catchtouchmove="true"目的是为了阻止弹窗滚动的时候 会带动外层页面的滚动,但是如果弹窗元素设置了该属性,弹窗内的自己写的overflow:auto就会失效,这时不能用自己写的overflow,要改用scroll-view组件,就可以解决该问题。catchtouchmove相当于preventDefault,阻止默认行为即阻止滚动事件。
<!-- 弹窗遮罩层 -->
<view catchtouchmove='true'>
<!-- 弹窗遮罩层里需要滚动的页面 -->
<scroll-view scroll-y="true">
</scroll-view>
</view>
参考:https://blog.csdn.net/qq_44749901/article/details/136700084