收藏
回答

小程序map组件中使用了cover-view,给它添加的点击事件无效?或者不能添加点击事件?

我在map组件中使用了cover-view ,并添加了点击事件,但是无效

<map id="map" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" min-scale="{{minscale}}" enable-poi="{{enablepoi}}" polyline="{{polyline}}" polygons="{{polygons}}" scale="{{scale}}" skew="{{skew}}" enable-3D="{{setting.enable3D}}" markers="{{markers}}" bindtap="onTapMap" bindregionchange="bindregionchange" bindmarkertap="bindmarkertap">
<block wx:for="{{markers}}" wx:key="id">
  <cover-view slot="callout">
  <cover-view class="customCallout pr" marker-id="{{item.id}}" bindtap="clickMap">
    <cover-view class="callout-warp display-f">
      <cover-view class="item">
        <cover-view class="text-c">问题总数</cover-view>
        <cover-view class="text-c count">20</cover-view>
      </cover-view>
      <cover-view class="item">
        <cover-view class="text-c">未整改</cover-view>
        <cover-view class="text-c count">20</cover-view>
      </cover-view>
      <cover-view class="item">
        <cover-view class="text-c">整改率排名</cover-view>
        <cover-view class="text-c count">20</cover-view>
      </cover-view>
    </cover-view>
      <cover-image class="icon-down pa" src="/assets/images/icon_down.png" />
      <cover-image class="icon-avatar pa" src="{{item.avatar}}" />
      <cover-view class="mapName pa" bindtap="clickMap">{{item.title}}</cover-view>
    </cover-view>
  </cover-view>
</block>
</map>


回答关注问题邀请回答
收藏
登录 后发表内容