PriorityTag.vue 569 B

12345678910111213141516171819202122232425
  1. <template>
  2. <template v-if="priority === '紧急'">
  3. <ElTag :size="size" type="warning">{{priority}}</ElTag>
  4. </template>
  5. <template v-else-if="priority === '一般'">
  6. <ElTag :size="size">{{priority}}</ElTag>
  7. </template>
  8. <template v-else-if="priority === '宽松'">
  9. <ElTag :size="size" type="success">{{priority}}</ElTag>
  10. </template>
  11. </template>
  12. <script lang="ts">
  13. import { defineComponent } from 'vue';
  14. export default defineComponent({
  15. props: {
  16. priority: String,
  17. size: {
  18. type: String,
  19. default: '',
  20. },
  21. },
  22. });
  23. </script>