cover-view 里不能放button吗?
发布于 5 年前 作者 hkang 17923 次浏览 来自 问答

第一张图是在模拟器里的效果,安卓正常,在ios里不正常,第二张图是ios的截图,主要表现cover-view盖住了子控件button。

以下是主要代码

<cover-view class='mask'></cover-view>
  <cover-view class='panel'>
    <cover-view class='container'>
      <cover-view class='auth_title'>微信授权</cover-view>
      <cover-image class='logo' src='../resources/imgs/logo.png' mode='widthFix'></cover-image>
      <cover-view class='info'>定制您的专属提醒,需要您授权小叮:</cover-view>
      <cover-view class='info'>● 获取您的公开信息(昵称,头像等)</cover-view>
      <cover-view class='btn'>
        <button type='warn' bindtap='_refuse'>拒绝</button>
        <button bindgetuserinfo='_Auth' open-type='getUserInfo' type='primary'>同意</button>
      </cover-view>
    </cover-view>
  </cover-view>
.mask{position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: #000; opacity: 0.7; display: flex; align-items: center;justify-content:center;}
.panel{position: fixed; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center;justify-content:center;}
.container{width: 70%; background: #fff;  border-radius: 5px; text-align: center; }
.auth_title{font-size: 16px; width: 100%; font-weight: bold; color: #000; }
 .logo{width: 80px; margin-bottom: 20px;}
.info{white-space:normal; font-size: 13px;color: #666; width: 100%;}
.btn{width: 100%; background: #fff; }
3 回复

你好,麻烦提供出现问题的机型和微信版本,并且提供相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),方便定位问题

<button><cover-view>同意</cover-view></button>

我也碰到这个问题了,android的华为荣耀9

回到顶部