优化代码
parent
93a12decbf
commit
728aa09585
|
@ -10,29 +10,20 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, defineComponent } from 'vue'
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import FlagView from './components/FlagView.vue'
|
||||
import EarthView from './components/EarthView.vue'
|
||||
import SatelliteTableView from './components/SatelliteTableView.vue'
|
||||
import SatelliteSystemSelectView from './components/SatelliteSystemSelectView.vue'
|
||||
|
||||
export default defineComponent({
|
||||
setup () {
|
||||
const earthView = ref(null)
|
||||
const flagView = ref(null)
|
||||
const onSatelliteSystemChanged = ss => {
|
||||
const earthView = ref(null)
|
||||
const flagView = ref(null)
|
||||
const onSatelliteSystemChanged = ss => {
|
||||
if (earthView.value) earthView.value.loadSatelliteOrbit(ss)
|
||||
if (flagView.value) flagView.value.show_flag(ss)
|
||||
}
|
||||
const onTrackSatelliteSelected = id => {
|
||||
}
|
||||
const onTrackSatelliteSelected = id => {
|
||||
if (earthView.value) earthView.value.trackSatellite(id)
|
||||
}
|
||||
|
||||
return { earthView, flagView, onSatelliteSystemChanged, onTrackSatelliteSelected }
|
||||
},
|
||||
components: {
|
||||
FlagView, EarthView, SatelliteSystemSelectView, SatelliteTableView
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue