收藏
回答

cover-view 里不能放button吗?

框架类型 问题类型 终端类型 操作系统 微信版本 基础库版本
小程序 Bug 客户端 iOS 6.7.1 2.2.0


第一张图是在模拟器里的效果,安卓正常,在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 个回答

  • 16@
    16@
    2018-09-01

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

    2018-09-01
    有用
    回复
  • undefined
    undefined
    2018-07-24

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

    2018-07-24
    有用
    回复
  • 灵芝
    灵芝
    2018-07-23

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

    2018-07-23
    有用
    回复
登录 后发表内容