BaseTitle.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <script setup>
  2. defineProps({
  3. title: {
  4. type: String,
  5. default: ''
  6. },
  7. type: {
  8. type: String,
  9. default: 'first'
  10. }
  11. })
  12. </script>
  13. <template>
  14. <div class="header">
  15. <div class="title">
  16. <svg xmlns="http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24" fill="none" v-if="type === 'first'">
  17. <path d="M0 6.86197V3.24507L4.21274 0H7.11111L4.45741 24H1.35684L4.01053 3.85352L0 6.86197Z" fill="#2454FF" />
  18. </svg>
  19. <svg xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 12 24" fill="none" v-else>
  20. <path d="M7.74366 10.4333C8.43696 9.03333 8.78361 7.76667 8.78361 6.6V6.1C8.78361 5.06667 8.58552 4.26667 8.16459 3.7C7.74366 3.13333 7.19892 2.83333 6.48086 2.83333C5.7628 2.83333 5.21807 3.1 4.8219 3.66667C4.42573 4.23333 4.22764 5.1 4.22764 6.23333V7.16667H1.94966V6.1C1.94966 4.26667 2.37059 2.8 3.18769 1.66667C4.02956 0.566667 5.14379 0 6.53039 0C7.42177 0 8.23887 0.266667 8.93217 0.8C9.62547 1.3 10.1702 2.03333 10.5416 2.96667C10.9378 3.9 11.1111 4.93333 11.1111 6.03333V6.6C11.1111 7.6 10.9873 8.5 10.7149 9.4C10.4673 10.2667 10.0959 11.1667 9.57595 12.1L2.94652 21.1667H9.16145V24H0V21.6L7.74366 10.4333Z" fill="#2454FF"/>
  21. </svg>
  22. <span class="text">{{ title }}</span>
  23. </div>
  24. <div class="btn-group space-x-[8px]">
  25. <slot name="right"/>
  26. </div>
  27. </div>
  28. </template>
  29. <style lang="scss" scoped>
  30. .header {
  31. @include flex(x, center, between);
  32. height: 75px;
  33. flex-shrink: 1;
  34. padding: 24px 16px 24px 16px;
  35. color: #1A2029;
  36. .title {
  37. display: flex;
  38. align-items: center;
  39. height: 24px;
  40. .text {
  41. height: 100%;
  42. padding-left: 13px;
  43. margin-left: -6px;
  44. background: linear-gradient(90deg, rgba(36, 84, 255, 0.10) -0.94%, rgba(36, 84, 255, 0.00) 95.3%);
  45. font-size: 15px;
  46. font-weight: bold;
  47. line-height: 24px
  48. }
  49. }
  50. .btn-group {
  51. @include flex(x, center, center);
  52. }
  53. }
  54. </style>