HomeCardTitle.vue 543 B

123456789101112131415161718192021222324252627282930
  1. <script setup lang="ts">
  2. import { ArrowRightBold } from "@element-plus/icons-vue";
  3. const props = withDefaults(
  4. defineProps<{
  5. showArrow?: boolean;
  6. }>(),
  7. { showArrow: false }
  8. );
  9. </script>
  10. <template>
  11. <h2>
  12. <slot></slot>
  13. <el-icon v-if="props.showArrow" class="suffix"><ArrowRightBold /></el-icon>
  14. </h2>
  15. </template>
  16. <style lang="scss" scoped>
  17. h2 {
  18. border: none;
  19. margin: 0;
  20. padding: 0;
  21. display: flex;
  22. align-items: center;
  23. gap: 8px;
  24. .suffix {
  25. width: 24px;
  26. height: 24px;
  27. color: #00000042;
  28. }
  29. }
  30. </style>