Box2LineImageRightShadow.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <Touchable
  3. :style="{
  4. height: 'calc(100% - 20rpx)',
  5. width: 'calc(100% - 10rpx)',
  6. }"
  7. :flexGrow="1"
  8. overflow="hidden"
  9. direction="row"
  10. justify="space-between"
  11. :padding="[20,10]"
  12. @click="$emit('click')"
  13. >
  14. <FlexRow width="100%" :gap="20">
  15. <Image
  16. :width="wideImage ? 250 : 150"
  17. :height="150"
  18. :radius="10"
  19. :flexShrink="0"
  20. :src="image"
  21. mode="aspectFill"
  22. />
  23. <FlexCol :flexGrow="1" :width="500" :gap="10">
  24. <Text
  25. :color="'primary'"
  26. :fontConfig="desc || title1 ? 'title' : 'subText'"
  27. :lines="desc || title1 ? 1 : 2"
  28. >{{ title }}</Text>
  29. <Text
  30. fontConfig="subText"
  31. color="second"
  32. :lines="2"
  33. >{{ desc }}</Text>
  34. <Tag v-if="badge" :text="badge" scheme="light" type="primary" size="small" />
  35. <RoundTags v-if="tags" :tags="tags" small />
  36. </FlexCol>
  37. </FlexRow>
  38. <Text color="primary-second-text" fontConfig="caption">{{ right }}</Text>
  39. </Touchable>
  40. </template>
  41. <script setup lang="ts">
  42. import type { PropType } from 'vue';
  43. import RoundTags from './RoundTags.vue';
  44. import Tag from '@/components/display/Tag.vue';
  45. import FlexCol from '@/components/layout/FlexCol.vue';
  46. import FlexRow from '@/components/layout/FlexRow.vue';
  47. import Image from '@/components/basic/Image.vue';
  48. import Text from '@/components/basic/Text.vue';
  49. import Touchable from '@/components/feedback/Touchable.vue';
  50. defineProps({
  51. title: String,
  52. desc: String,
  53. right: String,
  54. image: String,
  55. tags: {
  56. type: Array as PropType<string[]>,
  57. default: null
  58. },
  59. wideImage: {
  60. type: Boolean,
  61. default: false,
  62. },
  63. title1: {
  64. type: Boolean,
  65. default: false,
  66. },
  67. badge: {
  68. type: String,
  69. default: '',
  70. }
  71. })
  72. </script>