card-title.vue 607 B

123456789101112131415161718192021222324252627282930313233343536
  1. <script lang="ts" setup>
  2. defineComponent({
  3. name: 'CardTitle'
  4. })
  5. const { title } = defineProps({
  6. title: {
  7. type: String,
  8. required: true
  9. }
  10. })
  11. </script>
  12. <template>
  13. <span class="card-title">{{ title }}</span>
  14. </template>
  15. <style scoped lang="scss">
  16. .card-title {
  17. font-size: 14px;
  18. font-weight: 600;
  19. &::before {
  20. content: '';
  21. display: inline-block;
  22. width: 3px;
  23. height: 14px;
  24. //background-color: #105cfb;
  25. background: var(--el-color-primary);
  26. position: relative;
  27. left: -5px;
  28. top: 8px;
  29. border-radius: 5px;
  30. transform: translateY(-50%);
  31. }
  32. }
  33. </style>