优化代码

master
叶志超 2021-12-22 15:02:15 +08:00
parent 93a12decbf
commit 728aa09585
1 changed files with 11 additions and 20 deletions

View File

@ -10,15 +10,13 @@
</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 => {
@ -28,11 +26,4 @@ export default defineComponent({
const onTrackSatelliteSelected = id => {
if (earthView.value) earthView.value.trackSatellite(id)
}
return { earthView, flagView, onSatelliteSystemChanged, onTrackSatelliteSelected }
},
components: {
FlagView, EarthView, SatelliteSystemSelectView, SatelliteTableView
}
})
</script>