1***@qq.com
1***@qq.com
  • 发布:2023-09-15 11:28
  • 更新:2023-09-15 11:28
  • 阅读:156

【报Bug】一个cover-view在APP端渲染了两个,H5正常

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 3.8.12

手机系统: Android

手机系统版本号: Android 13

手机厂商: 华为

手机机型: REP-AN00

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<view class="noPrize_box" v-if="isThank">  
    <cover-view class="noPrize" v-if="isThank"></cover-view>  
    <cover-view class="again" v-if="isThank"></cover-view>  
    <cover-view class="again_mask" @click="again" v-if="isThank"></cover-view>  
    <cover-view class="close" @click="close(2)" v-if="isThank"></cover-view>  
</view>
export default {  
  data () {  
    return {  
        isThank: true  
    }  
  },  
  methods:{  
    again(){},  
    close(){}  
  }  
}
.noPrize_box{  
    width: 100vw;  
    height: 100vh;  
    position: fixed;  
    top: 0px;  
    left: 0px;  
    text-align: center;  
    z-index: 30;  

    .noPrize{  
        width: 550rpx;  
        height: 550rpx;  
        background-image: url("../../static/home/noPrize.png");  
        background-size: contain;  
        background-repeat: no-repeat;  
        position: fixed;  
        top: 400rpx;  
        left: 100rpx;  
        z-index: 31;  
        text-align: center;  
        font-size: 14px;  
        animation: showNoPrize 1s ease-in-out;  
    }  

    .again{  
        width: 240rpx;  
        height: 66rpx;  
        line-height: 66rpx;  
        border-radius: 20px;  
        position: absolute;  
        left: 255rpx;  
        top: 650rpx;  
        color: #F05859;  
        background-image: url("../../static/home/btn_11.png");  
        background-size: 100% 100%;  
        z-index: 32;  
        animation: showNoPrize 1s ease-in-out;  
    }  
    .again_mask{  
        width: 340rpx;  
        height: 150rpx;  
        position: absolute;  
        left: 205rpx;  
        top: 610rpx;  
        z-index: 33;  
        background: rgba(0, 0, 0, 0.5);  
    }  
    .close{  
        width: 100rpx;  
        height: 200rpx;  
        background-image: url("../../static/home/close.png");  
        background-size: contain;  
        position: absolute;  
        left: 325rpx;  
        top: 770rpx;  
        z-index: 32;  
        animation: showNoPrize 1s ease-in-out;  
        background-color: rgba(255, 0, 0, 0.5);  
        background-repeat: no-repeat;  
        background-position: bottom;  
    }  
}

操作步骤:

如上,代码示例

预期结果:

如上,bug描述中的H5显示

实际结果:

如上,bug描述中的APP显示

bug描述:

页面中使用了canvas,需要更高层级的弹窗覆盖在canvas上面,所以使用了cover-view;
在H5显示正常;APP中显示渲染异常,通过背景色可以看出渲染了两个元素;
APP中,只有上面的元素是显示正常,但点击事件无效;下面的盒子是点击事件正常,显示异常;

2023-09-15 11:28 负责人:无 分享
已邀请:

要回复问题请先登录注册