TaskList.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <script setup lang="ts">
  2. import Button from '@/components/basic/Button.vue';
  3. import Icon from '@/components/basic/Icon.vue';
  4. import ImageButton from '@/components/basic/ImageButton.vue';
  5. import Text from '@/components/basic/Text.vue';
  6. import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
  7. import Touchable from '@/components/feedback/Touchable.vue';
  8. import FlexCol from '@/components/layout/FlexCol.vue';
  9. import FlexRow from '@/components/layout/FlexRow.vue';
  10. import Height from '@/components/layout/space/Height.vue';
  11. import Width from '@/components/layout/space/Width.vue';
  12. defineEmits(['click'])
  13. defineProps({
  14. icon: {
  15. type: String,
  16. default: 'task-summary',
  17. },
  18. title: {
  19. type: String,
  20. default: '村社概况',
  21. },
  22. desc: {
  23. type: String,
  24. default: '探索村社的历史渊源与发生轨迹',
  25. },
  26. button: {
  27. type: Boolean,
  28. default: true,
  29. },
  30. enable: {
  31. type: Boolean,
  32. default: true,
  33. },
  34. extra: {
  35. type: String,
  36. default: '',
  37. },
  38. goButtonText: {
  39. type: String,
  40. default: '去完成',
  41. },
  42. })
  43. </script>
  44. <template>
  45. <BackgroundBox
  46. backgroundImage="https://xy.wenlvti.net/app_static/images/village/BoxMid.png"
  47. :backgroundCutBorder="[10,10,10,10]"
  48. :backgroundCutBorderSize="[10,10,10,10]"
  49. >
  50. <Touchable
  51. :padding="25"
  52. :touchable="button && enable"
  53. direction="row"
  54. justify="space-between"
  55. align="center"
  56. @click="$emit('click')"
  57. >
  58. <FlexRow align="center">
  59. <FlexCol center radius="50%" backgroundColor="#efefef" :padding="20">
  60. <Icon :icon="icon || 'help-filling'" color="primary" type="material" :size="50" />
  61. </FlexCol>
  62. <Width :width="20" />
  63. <FlexCol class="info">
  64. <Text class="title" :fontSize="36" color="text.title" :text="title" />
  65. <Height :height="10" />
  66. <Text class="desc" :fontSize="24" color="text.second" :text="desc" />
  67. </FlexCol>
  68. </FlexRow>
  69. <FlexRow align="center" :flexShrink="0" :gap="15">
  70. <Text v-if="extra" class="extra" :fontSize="24" color="text.second" :text="extra" />
  71. <ImageButton
  72. v-if="button"
  73. src="https://xy.wenlvti.net/app_static/images/village/BoxButton.png"
  74. :touchable="enable"
  75. :width="140"
  76. :height="75"
  77. @click="$emit('click')"
  78. >
  79. <FlexCol position="absolute" inset="0" center>
  80. <Text :text="enable ? goButtonText : '未开放'" fontConfig="contentText" color="white" />
  81. </FlexCol>
  82. </ImageButton>
  83. </FlexRow>
  84. </Touchable>
  85. </BackgroundBox>
  86. </template>