FlightAreaIcon.vue 731 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <div class="flex-row flex-align-center">
  3. <div class="shape" :class="type" :style="isCircle ? 'border-radius: 50%;' : ''"></div>
  4. <div class="ml5" v-if="!hideTitle">{{ FlightAreaTypeTitleMap[type][isCircle ? EGeometryType.CIRCLE :
  5. EGeometryType.POLYGON] }}</div>
  6. </div>
  7. </template>
  8. <script lang="ts" setup>
  9. import { EFlightAreaType, EGeometryType, FlightAreaTypeTitleMap } from '../../types/flight-area'
  10. const props = defineProps<{
  11. type: EFlightAreaType,
  12. isCircle: boolean,
  13. hideTitle?: boolean
  14. }>()
  15. </script>
  16. <style lang="scss">
  17. .nfz {
  18. border-color: red;
  19. }
  20. .dfence {
  21. border-color: $tag-green;
  22. }
  23. .shape {
  24. width: 16px;
  25. height: 16px;
  26. border-width: 3px;
  27. border-style: solid;
  28. }
  29. </style>