RankVillageItem.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <BackgroundBox
  3. backgroundImage="https://xy.wenlvti.net/app_static/images/village/BoxDark.png"
  4. :backgroundCutBorder="[6,6,6,6]"
  5. :backgroundCutBorderSize="[10,10,10,10]"
  6. >
  7. <Touchable
  8. direction="row"
  9. justify="space-between"
  10. align="center"
  11. gap="gap.md"
  12. :padding="small ? [15,25] : [25,25]"
  13. @click="emit('click')"
  14. >
  15. <FlexRow align="center" gap="gap.lg">
  16. <BackgroundBox
  17. backgroundImage="https://xy.wenlvti.net/app_static/images/village/ImageBlessingCount.png"
  18. width="60rpx"
  19. height="60rpx"
  20. center
  21. >
  22. <Text :text="rank" fontConfig="h4" color="white" />
  23. </BackgroundBox>
  24. <Image
  25. :src="image"
  26. defaultImage="https://xy.wenlvti.net/app_static/images/village/PlaceholderVillage.jpg"
  27. :width="small ? 130 : 170"
  28. :height="small ? 80 : 120"
  29. mode="aspectFill"
  30. radius="radius.md"
  31. />
  32. <Text :text="title" fontConfig="contentText" />
  33. </FlexRow>
  34. <FlexRow center gap="gap.md">
  35. <BackgroundBox
  36. backgroundImage="https://xy.wenlvti.net/app_static/images/village/TagNormal.png"
  37. :backgroundCutBorder="[10,10,10,10]"
  38. :backgroundCutBorderSize="[10,10,10,10]"
  39. :padding="[15,10]"
  40. center
  41. direction="row"
  42. gap="gap.md"
  43. width="100"
  44. >
  45. <Image src="https://xy.wenlvti.net/app_static/images/village/IconLight.png" width="30rpx" height="30rpx" mode="aspectFill" />
  46. <Text :text="points || 0" fontConfig="contentText" />
  47. </BackgroundBox>
  48. </FlexRow>
  49. </Touchable>
  50. </BackgroundBox>
  51. </template>
  52. <script setup lang="ts">
  53. import Touchable from '@/components/feedback/Touchable.vue';
  54. import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
  55. import Text from '@/components/basic/Text.vue';
  56. import Image from '@/components/basic/Image.vue';
  57. import FlexRow from '@/components/layout/FlexRow.vue';
  58. const props = defineProps<{
  59. id: number;
  60. image: string;
  61. rank: number;
  62. title: string;
  63. points: number;
  64. small?: boolean;
  65. }>();
  66. const emit = defineEmits<{
  67. (e: 'click'): void;
  68. }>();
  69. </script>