更新vueCesiun和vue版本并使用局部引入

This commit is contained in:
叶志超
2021-12-09 11:15:07 +08:00
parent 687b19b565
commit dc18d9b0d1
5 changed files with 169 additions and 52 deletions

View File

@@ -16,6 +16,8 @@
<script lang="ts">
import { ref, defineComponent } from 'vue'
import { useStore } from 'vuex'
import { VcViewer, VcLayerImagery, VcProviderImageryTianditu, VcNavigation, VcDatasourceCzml } from 'vue-cesium'
import 'vue-cesium/dist/index.css'
export default defineComponent({
setup: () => {
const vcViewer = ref(null)
@@ -87,6 +89,9 @@ export default defineComponent({
}
return { vcViewer, token, czml, loadSatelliteOrbit, trackSatellite, onViewerReady, onDataSourceReady }
},
components: {
VcViewer, VcLayerImagery, VcProviderImageryTianditu, VcNavigation, VcDatasourceCzml
}
})
</script>