Open realmx opened 5 years ago
我也是遇到这个问题,请问解决了么
我也是遇到这个问题,请问解决了么
@670248996 我解决了,用事件委托搞了
我放弃了template,用别的方式做了 @chenmychou @670248996
我放弃了template,用别的方式做了 @chenmychou @670248996
请问用什么方式解决呢?
我放弃了template,用别的方式做了 @chenmychou @670248996
请问用什么方式解决呢?
用amap-marker的插槽,然后内容写好相对定位就可以了
<el-col>
<el-amap
ref="amap"
:zoomEnable="amap.zoomEnable"
:plugin="amap.plugin"
:events="amap.events"
:class="$style.amap"
>
<el-amap-marker
:bubble="true"
v-for="(item, index) in bridgeList"
:key="index"
:zIndex="item.zIndex"
:position="item.position"
>
<div :class="[$style.marker, item.hover && $style['marker-hover']]">
<div :class="$style['marker-content']">
<div
v-if="item.bridgeMapPic"
:class="$style['marker-thumb']"
@mouseenter="mouseenter(item)"
@mouseleave="mouseleave(item)"
@click="go(item)"
>
<img :src="item.bridgeMapPic | convertUrl">
<div>{{item.bridgeName}}</div>
</div>
<span
@mouseenter="mouseenter(item)"
@mouseleave="mouseleave(item)"
@click="go(item)"
>{{item.bridgeName}}</span>
</div>
<i
class="el-icon-location"
:class="[$style['marker-icon'], item.status && $style.danger]"
@mouseenter="mouseenter(item)"
@mouseleave="mouseleave(item)"
@click="go(item)"
></i>
</div>
</el-amap-marker>
</el-amap>
</el-col>
我放弃了template,用别的方式做了 @chenmychou @670248996
请问用什么方式解决呢?
用amap-marker的插槽,然后内容写好相对定位就可以了
<el-col> <el-amap ref="amap" :zoomEnable="amap.zoomEnable" :plugin="amap.plugin" :events="amap.events" :class="$style.amap" > <el-amap-marker :bubble="true" v-for="(item, index) in bridgeList" :key="index" :zIndex="item.zIndex" :position="item.position" > <div :class="[$style.marker, item.hover && $style['marker-hover']]"> <div :class="$style['marker-content']"> <div v-if="item.bridgeMapPic" :class="$style['marker-thumb']" @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" > <img :src="item.bridgeMapPic | convertUrl"> <div>{{item.bridgeName}}</div> </div> <span @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" >{{item.bridgeName}}</span> </div> <i class="el-icon-location" :class="[$style['marker-icon'], item.status && $style.danger]" @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" ></i> </div> </el-amap-marker> </el-amap> </el-col>
我放弃了template,用别的方式做了 @chenmychou @670248996
请问用什么方式解决呢?
用amap-marker的插槽,然后内容写好相对定位就可以了
<el-col> <el-amap ref="amap" :zoomEnable="amap.zoomEnable" :plugin="amap.plugin" :events="amap.events" :class="$style.amap" > <el-amap-marker :bubble="true" v-for="(item, index) in bridgeList" :key="index" :zIndex="item.zIndex" :position="item.position" > <div :class="[$style.marker, item.hover && $style['marker-hover']]"> <div :class="$style['marker-content']"> <div v-if="item.bridgeMapPic" :class="$style['marker-thumb']" @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" > <img :src="item.bridgeMapPic | convertUrl"> <div>{{item.bridgeName}}</div> </div> <span @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" >{{item.bridgeName}}</span> </div> <i class="el-icon-location" :class="[$style['marker-icon'], item.status && $style.danger]" @mouseenter="mouseenter(item)" @mouseleave="mouseleave(item)" @click="go(item)" ></i> </div> </el-amap-marker> </el-amap> </el-col>
试过了你的方法可行,但是我新建实例也解决了这个问题。谢谢!
在el-amap-marker里写入由vuex导入的内容,你们能实时更新嘛?
问题
amap-marker 使用 template 报错
[Vue warn]: Error in event handler for "AMAP_READY_EVENT": "TypeError: o.a.compile is not a function"
found in
--->