前言

在小程序编写过程中使用使用vant weapp的popup组件做小程序的弹出层,触屏导致底层页面跟着滑动。

解决方法

使用touch事件阻止属性,@touchmove.stop.prevent指向空事件
van-popup(
	:show="popupShow"
	:z-index="999"
	position="bottom"
	@close="popupClose"
	@touchmove.stop.prevent="moveHandle")
 
 methods: {
 	 moveHandle () {}
 

}

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐