收藏
回答

升级1.4.0后cover-view适配问题

问题模块
API和组件

rt,升级后,在map上加<cover-view>后,同样的代码在开发工具和真机(nexus 6p)下显示的效果有很大出入。



<view class="map-info">
    <map id="map"
    scale="14"
    controls="{{controls}}"
    bindcontroltap="controltap"
    markers="{{markers}}"
    bindmarkertap="markertap"
    polyline="{{polyline}}"
    include-points="{{includePoints}}"
    show-location style="">
      <cover-view class="map-header">
        <view class="order-real-time">
          <view class="order-status">
            <text>1</text>
          </view>
        </view>
      </cover-view>
    </map>
  </view>
.map-info {
  width: 100%;
  height: 680rpx ;
}
#map {
  width: 100%;
  height: 100%;
}
.map-header {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  height: 50rpx;
  width: 30%;
  padding: 20rpx;
  border-top-right-radius: 30rpx;
  border-bottom-right-radius: 30rpx;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
}
.order-real-time {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.order-status {
  color: #fc5724;
}

以上

最后一次编辑于  2017-07-15  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

3 个回答

  • 黄思程
    黄思程
    2017-07-17

    你好,cover-view里不能嵌套其他组件,只能嵌套cover-view或cover-image

    2017-07-17
    赞同
    回复
  • cheart
    cheart
    2017-07-17
    <view class="map-info">
        <map id="map"
        scale="14"
        controls="{{controls}}"
        bindcontroltap="controltap"
        markers="{{markers}}"
        bindmarkertap="markertap"
        polyline="{{polyline}}"
        include-points="{{includePoints}}"
        show-location style="">
          <cover-view class="map-header">
            <cover-view class="order-real-time">
              <cover-view class="order-status">
                <cover-view>1</cover-view>
              </cover-view>
            </cover-view>
          </cover-view>
        </map>
      </view>

    那也就是说可以这样呗?

    2017-07-17
    赞同
    回复
  • 晨
    2017-07-17

    你好,问题已复现,我们会尽快修复。

    2017-07-17
    赞同
    回复