show.vue 968 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <ui-group title="标注列表" class="show-taggings">
  3. <template #icon>
  4. <ui-icon
  5. ctrl
  6. :type="custom.showTaggings ? 'eye-s' : 'eye-n'"
  7. @click="custom.showTaggings = !custom.showTaggings"
  8. />
  9. </template>
  10. <TaggingSign
  11. v-for="tagging in taggings"
  12. :key="tagging.id"
  13. :tagging="tagging"
  14. :selected="selectTagging === tagging"
  15. :edit="false"
  16. @select="selected => selectTagging = selected ? tagging : null"
  17. class="show-tagging"
  18. />
  19. </ui-group>
  20. </template>
  21. <script setup lang="ts">
  22. import { ref } from 'vue'
  23. import { custom } from '@/env'
  24. import TaggingSign from './sign.vue'
  25. import { taggings } from '@/store'
  26. import type { Tagging } from '@/store'
  27. const selectTagging = ref<Tagging | null>(null)
  28. </script>
  29. <style lang="scss">
  30. .show-taggings.ui-group > h3.group-title {
  31. margin-bottom: 0;
  32. }
  33. .show-tagging.sign-tagging.active::after {
  34. display: none;
  35. }
  36. </style>