您现在的位置是:首页 > 网站制作 > uni-appuni-app
弹窗背景样式穿透滑动问题
蒙xs2022-12-09【uni-app】人已围观
简介1.在外层添加个view 加入@touchmove.stop.prevent="() => { }"<view @touchmove.stop.prevent="() => { }">
<u-overlay :show="bgShow" :mask-click-able="false">
1.在外层添加个view 加入@touchmove.stop.prevent="() => { }"
<view @touchmove.stop.prevent="() => { }">
<u-overlay :show="bgShow" :mask-click-able="false">
</u-overlay>
</view>
2.但是又出现了弹出层不能滑动问题,所以要在里面添加
<u-overlay :show="bgShow" :mask-click-able="false">
</u-overlay>
</view>
<scroll-view class="Mortitae" scroll-y>
</scroll-view>
样式添加
</scroll-view>
.Mortitae{
max-height: 150rpx;
overflow-y: scroll;
}
完整代码
max-height: 150rpx;
overflow-y: scroll;
}
<view @touchmove.stop.prevent="() => { }">
<u-overlay :show="bgShow" :mask-click-able="false">
<scroll-view class="Mortitae" scroll-y>
<view>1</view>
</scroll-view>
</u-overlay>
</view>
<style scoped lang="scss">
.Mortitae{
max-height: 150rpx;
overflow-y: scroll;
}
</style>
<u-overlay :show="bgShow" :mask-click-able="false">
<scroll-view class="Mortitae" scroll-y>
<view>1</view>
</scroll-view>
</u-overlay>
</view>
<style scoped lang="scss">
.Mortitae{
max-height: 150rpx;
overflow-y: scroll;
}
</style>
Tags:
很赞哦! ()