index-title-wrap.vue 877 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="fx-col gap-15">
  3. <view class="fx-row fx-bet-cen">
  4. <view class="flex items-center">
  5. <view v-if="!disableLine" :style="lineStyle"/>
  6. <text class="text-main" :class="{'font-bold': bold}">{{ title }}</text>
  7. </view>
  8. <slot name="more"/>
  9. </view>
  10. <slot/>
  11. </view>
  12. </template>
  13. <script setup>
  14. import {computed} from 'vue'
  15. const props = defineProps({
  16. title: {
  17. type: String,
  18. default: ''
  19. },
  20. disableLine: {
  21. type: Boolean,
  22. default: false
  23. },
  24. bold: {
  25. type: Boolean,
  26. default: false
  27. }
  28. })
  29. const lineStyle = computed(() => ({
  30. backgroundColor: 'var(--primary-deep-color)',
  31. width: '5px',
  32. height: '12px',
  33. borderRadius: '2px',
  34. marginRight: '5px'
  35. }))
  36. </script>
  37. <style scoped>
  38. </style>