TaskList.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 Height from '@/components/layout/space/Height.vue';
  8. import Width from '@/components/layout/space/Width.vue';
  9. defineEmits(['click'])
  10. defineProps({
  11. icon: {
  12. type: String,
  13. default: 'task-summary',
  14. },
  15. title: {
  16. type: String,
  17. default: '村落概况',
  18. },
  19. desc: {
  20. type: String,
  21. default: '探索村落的历史渊源与发生轨迹',
  22. },
  23. button: {
  24. type: Boolean,
  25. default: true,
  26. },
  27. enable: {
  28. type: Boolean,
  29. default: true,
  30. }
  31. })
  32. </script>
  33. <template>
  34. <FlexRow :padding="25" backgroundColor="white" :radius="20" justify="space-between" align="center">
  35. <FlexRow align="center">
  36. <FlexCol center radius="50%" backgroundColor="#efefef" :padding="20">
  37. <Icon :icon="icon || 'help-filling'" color="primary" type="material" :size="50" />
  38. </FlexCol>
  39. <Width :width="20" />
  40. <FlexCol class="info">
  41. <Text class="title" :fontSize="36" color="text.title" :text="title" />
  42. <Height :height="10" />
  43. <Text class="desc" :fontSize="24" color="text.second" :text="desc" />
  44. </FlexCol>
  45. </FlexRow>
  46. <Button v-if="button"
  47. type="primary"
  48. shape="round"
  49. size="small"
  50. :radius="40"
  51. :touchable="enable"
  52. @click="$emit('click')"
  53. :text="enable ? '去完成' : '未开放'"
  54. />
  55. <view v-else></view>
  56. </FlexRow>
  57. </template>