<template>
<view class="newCommodity_warp w-100 position-relative">
<view class="bg-transparent w-100" :style="{'height':statusBarHeight+'px'}"></view>
<view class="content flex flex-column" style="height: 1000rpx;">
<view class="btn bg-danger w-100 align-center justify-center" style="height: 80rpx;margin-top: 500rpx;" @click="btn">
<text class="font text-white">弹窗下的按钮</text>
</view>
</view>
<div style="z-index:9999;overflow:hidden" v-if="isMask" catchtouchmove="false">
<div class="position-fixed top-0 left-0 right-0 bottom-0" style="background-color: rgba(0,0,0,0.5);"></div>
<div class="position-fixed left-0 right-0 bottom-0 bg-white pt-1" style="height: 400rpx;">
<text>内容</text>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
statusBarHeight:0,
isMask:false
}
},
created() {
const res = uni.getSystemInfoSync();
const system = res.platform;
this.statusBarHeight = res.statusBarHeight;
},
methods: {
btn(){
this.isMask = !this.isMask
},
back(){
uni.navigateBack({
delta:1
})
},
}
}
</script>
<style scoped>
</style>
DCloud_UNI_Anne
请直接提供可复制的demo,或者上传附件
2020-12-25 14:26
8***@qq.com (作者)
回复 DCloud_UNI_Anne: 已上传附件
2020-12-25 15:22