123456789101112131415161718192021222324252627282930313233343536 |
- <script setup lang="ts">
- import { ArrowRightBold } from "@element-plus/icons-vue";
- const props = withDefaults(
- defineProps<{
- showArrow?: boolean;
- }>(),
- { showArrow: false }
- );
- </script>
- <template>
- <h2>
- <slot></slot>
- <el-icon v-if="props.showArrow" class="suffix"><ArrowRightBold /></el-icon>
- </h2>
- </template>
- <style lang="scss" scoped>
- @use '@/.vitepress/theme/screen' as *;
- h2 {
- border: none;
- margin: 0;
- padding: 0;
- display: flex;
- align-items: center;
- gap: 8px;
- color: var(--card-title-color);
- @include breakpoint(mobile) {
- font-size: 18px;
- }
- .suffix {
- width: 24px;
- height: 24px;
- color: #00000042;
- }
- }
- </style>
|