HomeCardTitle.vue 674 B

123456789101112131415161718192021222324252627282930313233343536
  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. @use '@/.vitepress/theme/screen' as *;
  18. h2 {
  19. border: none;
  20. margin: 0;
  21. padding: 0;
  22. display: flex;
  23. align-items: center;
  24. gap: 8px;
  25. color: var(--card-title-color);
  26. @include breakpoint(mobile) {
  27. font-size: 18px;
  28. }
  29. .suffix {
  30. width: 24px;
  31. height: 24px;
  32. color: #00000042;
  33. }
  34. }
  35. </style>