FileItemRemoveBtn.vue 534 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <span class="file-item-remove-btn" @click.stop="handleRemove"><icon-close /></span>
  3. </template>
  4. <script setup>
  5. const emit = defineEmits(['delete']);
  6. /**
  7. * 移除
  8. */
  9. const handleRemove = () => {
  10. emit('delete');
  11. };
  12. </script>
  13. <style lang="css" scoped>
  14. .file-item-remove-btn {
  15. position: absolute;
  16. background-color: red;
  17. color: #fff;
  18. border-radius: 50%;
  19. cursor: pointer;
  20. font-size: 12px;
  21. width: 14px;
  22. height: 14px;
  23. display: inline-flex;
  24. justify-content: center;
  25. align-items: center;
  26. }
  27. </style>