<template>
  <view 
    :class="[
      'home-title',
      showMore ? 'has-more' : '',
      inWing ? 'wing-l in-wing' : '',
    ]"
  >
    <text>{{ title }}</text>
    <text v-if="showMore" class="more" @click="$emit('clickMore')">
      查看全部
      <text class="iconfont icon-arrow-right ml-2" />
    </text>
  </view>
</template>

<script setup lang="ts">
defineProps({	
  title: {
    type: String,
    default: '',
  },
  inWing: {
    type: Boolean,
    default: false,
  },
  showMore: {
    type: Boolean,
    default: false,
  }
})
defineEmits(['clickMore'])
</script>