Dafrok / vue-baidu-map

Baidu Map components for Vue 2.x

Home Page:https://dafrok.github.io/vue-baidu-map/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

咨询个问题:需求原因,baidu-map容器中存在俩个bm-polyline覆盖组件标签,同时存在时,怎么区分各自的点击click事件?目前存在一个另一个就无法触发。。。

yangyangjizi opened this issue · comments

<baidu-map
class="map"
:center="defauftCenter"
:high-resolution="false"
:zoom="defauftZoom"
:map-click="false"
:double-click-zoom="false"
@ready="createMap"
@mousemove="outMousemove"
@rightclick="addNewcoor"
@click="paintPolyline"
:scroll-wheel-zoom="true"
>

  <bm-polyline
    v-for="(one, index) in polylineDataList"
    :key="'polyline' + index"
    :path="one"
    :stroke-color="
      one[0].indexType == 'RUINS'
        ? 'red'
        : one[0].indexType == 'COLLECT'
        ? 'yellow'
        : one[0].indexType == 'SECTION'
        ? '#9400D3'
        : one[0].indexType == 'AREA'
        ? 'blue'
        : '#FF00FF'
    "
    :stroke-opacity="0.5"
    :stroke-weight="4"
    :editing="false"
    @mouseover="mouseoverLabel('LINE', one, $event)"
    @click="oneNotice('polyline', one, $event)"
  >
以上代码未完全贴出,无法搞定其层级的影响。。。求大佬指点下啊

我也遇到这问题了,请问楼主解决了没