InfoWindow.vue 923 Bytes
<template>
  <div>
    <div class="box-card" style="padding: 0 80 30 80;width: 400px;border-radius: 10px;">

      {{ title }}
      <div id="del-div">
        <div type="primary" icon="el-icon-close" @click="close()">123</div>
      </div>
      <div style="text-align: center;">
        <button type="primary">主要按钮</button>
      </div>
  </div>
  </div>
</template>

<script>
export default {
  props: {
    infoWindow: {
      type: Object,
      default: () => { }
    },
    title: {
      type: String,
      default: ''
    }
  },
  methods: {
    // 关闭
    close() {
      // 高德地图信息窗关闭的api
      this.infoWindow.close()
    },
    edit() {
      console.log('编辑按钮测试')
    },
    del() {
      console.log('删除按钮测试')
    }
  }
}
</script>

<style lang="less" scoped>
#del-div {
  position: absolute;
  right: 20;
  top: 20;
  transform: scale(1.2);
}
</style>