优化代码
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user