cover-view position属性的时候,开发者工具无法预览,移动端正常
发布于 6 年前 作者 jiangming 3105 次浏览 来自 官方Issues
<cover-view class="tm" wx:if="{{tmVisable}}">
  <cover-view class="tm-cover" bindtap="handleTm" data-modal="false"></cover-view>
  <cover-view class="tm-gird zf-inner">
    <cover-view class="tm-i"
                bindtap="chooseTi"
                wx:for="{{pList}}"
                wx:key="{{index}}"
                data-id="{{item.id}}"
                data-index="{{index}}">
      <cover-view class="tm-il">{{item.cname}}</cover-view>
    </cover-view><!--tm-i-->
  <cover-view style="width: 100%;height: 80rpx;"></cover-view>
  </cover-view><!--tm-gird-->
</cover-view>
.tm{
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  overflow: hidden;
}
.tm-cover{
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6);
}
.tm-gird{
  width: 100%;
  max-height: 80vh;
  justify-content: left;
  flex-wrap: wrap;
  background-color: #f1f1f1;
  padding: 40rpx 0 0 0;
  overflow-y: scroll;
}
.tm-i{
  width: 28%;
  text-align: center;
  color: #666666;
  margin-top: 30rpx;
  background-color: #ffffff;
  margin-left: 20rpx;
}
.tm-i:nth-child(3n+1){
  margin-left:40rpx;
}
.tm-il{
  height: 70rpx;
  line-height: 70rpx;
  font-size: 22rpx;
}
1 回复

请具体描述问题出现的流程,提供工具的版本类型和版本号,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部