解决移动端uniapp:滑动弹出蒙层底部跟着滑动的问题

// dom
<uni-popup
	ref="popup"
	:show="show" 
	type="bottom" 
	class="popup"
	:safe-area="false"
>
	<view></view>	
</uni-popup>


methods:{
	//弹出
	openPopup(){
		this.$refs.popup.open('bottom');
		document.documentElement.style.overflow = "hidden"
	},
	closePopup(){
		this.$refs.popup.close();
		document.documentElement.style.overflow = "scroll";
	},
}


			

以下代码可获得滚轮位置:

var top_value = $(document).scrollTop()||document.documentElement.scrollTop || document.body.scrollTop;

你可能感兴趣的:(uni-app,前端,javascript)