阻止uni-popup弹出框显示后,遮罩层下方内容滚动问题

问题: 弹出框打开后,滑动页面 遮罩层下方内容也会滚动

<template>
	<page-meta :page-style="'overflow:'+(isShow?'hidden':'visible')"></page-meta>
	<view class="index-container">
		<button @click="open">打开弹窗</button>
		<uni-popup ref="popupRef" type="center" @change="change">
			<view style="width: 300px; height: 300px;background-color: aqua;">
				我是弹框内容
			</view>
		</uni-popup>
		<view class="" v-for="(item,index) in 200">{
   
   {index}}</view>
	</view>
</template>
<script>
	export default { 
		data() {
			return {
				isShow:false
			}
		},
		methods: {
			 open(){
				this.$refs.popupRef.open('center')
			  },
			  change(e) {
				  this.isShow = e.show
			  }
		}
	}
</script>

Guess you like

Origin blog.csdn.net/Tianxiaoxixi/article/details/130365866