Skip to content

PopupCommon - 自定义弹窗

选取不同的弹窗样式

基础用法

使用type定义弹窗样式

通用弹窗

vue
<template>
  <div class="form-cus">
    <PopupCommon :map="map" :position="pos" :options="options">
      <div>自定义弹窗内容</div>
    </PopupCommon>
  </div>
</template>

<script setup lang="ts">
  let pos = { x: -2506632.39199, y: 4872596.18677, z: 3392043.84893};
  const options = {
    offset: { x: 50, y: -100 },
    maxHeight: 10000,
  }
</script>

属性参数

属性名说明类型可选值默认值Required
map影像地图object-true
position弹窗位置object-true
type弹窗样式stringdefault/style1'default'false
options弹窗属性,包括偏移量,最大可视距离object{ offset: { x: 0, y: 0 }, maxHeight: 1000000 }false
title弹窗标题,仅在 type=style1时生效string-false

方法事件

事件名说明参数
@close-this关闭按钮事件,仅在 type=style1时生效-