HomeTitle.vue 585 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <view
  3. :class="[
  4. 'home-title',
  5. showMore ? 'has-more' : '',
  6. inWing ? 'wing-l in-wing' : '',
  7. ]"
  8. >
  9. <text>{{ title }}</text>
  10. <text v-if="showMore" class="more" @click="$emit('clickMore')">
  11. 查看全部
  12. <text class="iconfont icon-arrow-right ml-2" />
  13. </text>
  14. </view>
  15. </template>
  16. <script setup lang="ts">
  17. defineProps({
  18. title: {
  19. type: String,
  20. default: '',
  21. },
  22. inWing: {
  23. type: Boolean,
  24. default: false,
  25. },
  26. showMore: {
  27. type: Boolean,
  28. default: false,
  29. }
  30. })
  31. defineEmits(['clickMore'])
  32. </script>