采用**@touchmove.stop.prevent=“moveHandle”** 阻止父级 页面 滚动条
另弹窗中需要配合 scroll-view scroll-y=“true” class=“scroll-view” 方可滚动 注意添加 “scroll-y=“true””
<view class="popmeng" @tap.stop="stopPop" id="bt" :class="show?'popmeng1':''" >
<view class="addpop" @tap.stop="" id="addpop" :class="show?'showpop':''" @touchmove.stop.prevent="moveHandle">
<!-- 拖拽 -->
<view class="btnpop-box" @touchend='touchend' @touchmove="touchmove($event)"
@touchstart="touchstart($event)">
<view class="drag">
</view>
</view>
<view class="pop-tit">
{{showType==1?'全部藏品':'正在寄售'}}
<view class="pop-tit-line" >
</view>
</view>
<view class="pop-content">
<template v-if="lists.length>0">
<scroll-view scroll-y="true" class="scroll-view">
<view class="pop-list" v-for="(item,index) in lists" :key="index" @click.stop="goDetail(item.id)">
<view class="poplist-left">
<img :src="item.image" alt="">
</view>
<view class="poplist-right">
<view class="pop-list-content">
<view class="pop-list-tit">
{{item.name}}
</view>
<view class="pop-list-nums-box">
<view class="pop-list-num" v-if="item.goods_number_new">
#{{item.goods_number_new}}
</view>
<view class="pop-list-nums" v-if="showType == 2">
{{item.price}}元
</view>
</view>
</view>
<view class="pop-radio" @tap.stop="shangjia(item.id,item.name,1)" v-if="showType == 1">
<img src="../../assets/shangjia.png" alt="">
</view>
<view class="pop-radio" @tap.stop="shangjia(item.id,item.name,2)" v-if="showType == 2">
<img src="../../assets/xiajia.png" alt="">
</view>
<view class="pop-radio" @tap.stop="shangjia(item.id,item.name,3)" v-if="showType == 2" style="margin-left: 48rpx;">
<img src="../../assets/gaijia.png" alt="">
</view>
</view>
</view>
</scroll-view>
</template>
</view>
<view class="pop-btn-box" style="z-index: 50;">
<!-- -->
<view class="pop-btn-submit1" @tap="allshangjia(lists[0].name,4)" v-if="showType==1">
全部上架
</view>
<view class="pop-btn-submit1" @tap.stop="allxiajia()" v-else>
全部下架
</view>
</view>
</view>
</view>
<script setup>
export default {
data() {
return {
show:false;
}
},
methods: {
// 打开弹窗
add() {
this.show = true //打开弹窗
},
// 关闭弹窗index
stopPop() {
this.$nextTick(() => this.show = false);
},
//
moveHandle(){
return false;
},
}
}
</script>