方法一、touch触摸事件:
<view @touchmove.stop.prevent="moveHandle"></view>
methods: {
moveHandle() {}
}
方法二、 css控制底层不允许滚动:
<template>
<view :class="isShowPopup? 'popup-show': ''">
<view>...</view>
</view>
</template>
<script>
export default {
data() {
return {
isShowPopup : false,
}
},
}
</script>
<style>
.popup-show {
overflow: hidden;
position: fixed;
height: 100%;
width: 100%;
}
</style>
网友评论