You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
867 B

  1. <template>
  2. <label-select-single
  3. v-if="singleLabel"
  4. :annotations="annotations"
  5. :labels="labels"
  6. @add="$emit('add', $event)"
  7. @remove="$emit('remove', $event)"
  8. />
  9. <label-select-multi
  10. v-else
  11. :annotations="annotations"
  12. :labels="labels"
  13. @add="$emit('add', $event)"
  14. @remove="$emit('remove', $event)"
  15. />
  16. </template>
  17. <script>
  18. import LabelSelectSingle from './singleLabel/LabelSelect.vue'
  19. import LabelSelectMulti from './multiLabel/LabelSelect.vue'
  20. export default {
  21. components: {
  22. LabelSelectSingle,
  23. LabelSelectMulti
  24. },
  25. props: {
  26. labels: {
  27. type: Array,
  28. default: () => [],
  29. required: true
  30. },
  31. annotations: {
  32. type: Array,
  33. default: () => ([]),
  34. required: true
  35. },
  36. singleLabel: {
  37. type: Boolean,
  38. default: false,
  39. required: true
  40. }
  41. }
  42. }
  43. </script>