TaskList.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <script setup lang="ts">
  2. import Button from '@/components/basic/Button.vue';
  3. import Icon from '@/components/basic/Icon.vue';
  4. import Text from '@/components/basic/Text.vue';
  5. import FlexCol from '@/components/layout/FlexCol.vue';
  6. import FlexRow from '@/components/layout/FlexRow.vue';
  7. import Width from '@/components/layout/space/Width.vue';
  8. defineEmits(['click'])
  9. defineProps({
  10. icon: {
  11. type: String,
  12. default: 'task-summary',
  13. },
  14. title: {
  15. type: String,
  16. default: '村落概况',
  17. },
  18. desc: {
  19. type: String,
  20. default: '探索村落的历史渊源与发生轨迹',
  21. },
  22. button: {
  23. type: Boolean,
  24. default: true,
  25. },
  26. })
  27. </script>
  28. <template>
  29. <FlexRow :padding="25" backgroundColor="white" :radius="20" justify="space-between" align="center">
  30. <FlexRow align="center">
  31. <FlexCol center radius="50%" backgroundColor="#efefef" :padding="20">
  32. <Icon :icon="icon" color="primary" type="material" :size="50" />
  33. </FlexCol>
  34. <Width :width="20" />
  35. <FlexCol class="info">
  36. <Text class="title" :fontSize="36" color="text.title" :text="title" />
  37. <Height :height="10" />
  38. <Text class="desc" :fontSize="24" color="text.second" :text="desc" />
  39. </FlexCol>
  40. </FlexRow>
  41. <Button v-if="button" type="primary" shape="round" size="small" :radius="40" @click="$emit('click')">去完成</Button>
  42. <view v-else></view>
  43. </FlexRow>
  44. </template>