fuchengshen
2022-07-09 3a25c05b5ab837714f30469cdcb1e2a77d8d7f6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<template>
  <mars-pannel :visible="true" right="10" top="10">
    <a-space>
      <a-checkbox v-model:checked="enabledAggressive" @change="formStateChange">是否聚合</a-checkbox>
 
      <mars-button title="贴地属性性能较低,建议异步计算后将高度值存放数据库内,后期直接加载此高度值" @click="getDataSurfaceHeight">
        演示异步计算贴地高度
      </mars-button>
    </a-space>
  </mars-pannel>
</template>
 
<script setup lang="ts">
import { ref } from "vue"
 
// mapWork是map.js内定义的所有对象, 在项目中使用时可以改为import方式使用:  import * as mapWork from './map.js'
const mapWork = window.mapWork || {}
 
const enabledAggressive = ref(true)
 
const formStateChange = () => {
  mapWork.enabledAggressive(enabledAggressive.value)
}
 
const getDataSurfaceHeight = () => {
  mapWork.getDataSurfaceHeight()
}
</script>