vue-amap infowindow基础用法

<template>
  <div class="amap-page-container">
    <el-amap vid="amapDemo"
             :zoom="zoom"
             :center="center"
             :amap-manager="amapManager"
             :events="mapEvents"
             class="amap-demo">
             
      <el-amap-info-window :position="currentWindow.position"
                           :content="currentWindow.content"
                           :visible="currentWindow.visible"
                           :events="currentWindow.events"
                           :offset="[8,-32]">
      </el-amap-info-window>
      
    </el-amap>
  </div>
</template>
data () {
    
    
return {
    
    
  currentWindow: {
    
    
    position: [116.405994, 39.915378],
    content: '<div class="red">Hi! I am here!</div>',
    events: {
    
    

    },
    visible: true
  }
}

猜你喜欢

转载自blog.csdn.net/yuyu_2019/article/details/110742473