飞行作业画面 有时机场图标不出问题修改
parent
d2b463a67d
commit
9247ff8c4c
|
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, onBeforeUnmount, reactive } from 'vue';
|
||||
import { onMounted, ref, onBeforeUnmount, reactive, watch } from 'vue';
|
||||
import {
|
||||
SelectComponent,
|
||||
AirportInformation,
|
||||
|
|
@ -107,13 +107,23 @@
|
|||
longitude: null,
|
||||
});
|
||||
const uavTrack = ref({});
|
||||
const connected = ref(false)
|
||||
const connectCallback = () => {
|
||||
connected.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
destroyConnection();
|
||||
createConnection();
|
||||
setTimeout(() => {
|
||||
changeSelect();
|
||||
}, 1000);
|
||||
createConnection(connectCallback);
|
||||
// setTimeout(() => {
|
||||
// changeSelect();
|
||||
// }, 1000);
|
||||
});
|
||||
watch(() => connected.value, (value) => {
|
||||
if(value){
|
||||
console.log('start')
|
||||
changeSelect()
|
||||
}
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
destroyConnection();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue