Box2LineImageRightShadow.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view
  3. class="d-flex flex-row flex-grow-1 justify-between shadow-s
  4. radius-base mb-3 p-2 pt-3 pb-3 overflow-hidden
  5. border-all-light-light-primary"
  6. :style="{
  7. height: 'calc(100% - 20rpx)',
  8. width: 'calc(100% - 10rpx)',
  9. }"
  10. @click="$emit('click')"
  11. >
  12. <view class="d-flex flex-row w-100">
  13. <image
  14. :class="[
  15. wideImage ? 'width-250' : 'width-150',
  16. 'height-150',
  17. 'radius-base',
  18. 'flex-shrink-0'
  19. ]"
  20. :src="image"
  21. mode="aspectFill"
  22. />
  23. <view class="d-flex flex-col ml-3 flex-one width-500">
  24. <text :class="[
  25. 'color-primary size-base',
  26. desc || title1 ? 'text-lines-1' : 'text-lines-2',
  27. ]">{{ title }}</text>
  28. <text class="size-s color-second text-lines-2 mt-2">{{ desc }}</text>
  29. <RoundTags v-if="tags" :tags="tags" small />
  30. </view>
  31. </view>
  32. <text class="color-primary-second-text size-ss">{{ right }}</text>
  33. </view>
  34. </template>
  35. <script setup lang="ts">
  36. import type { PropType } from 'vue';
  37. import RoundTags from './RoundTags.vue';
  38. defineProps({
  39. title: String,
  40. desc: String,
  41. right: String,
  42. image: String,
  43. tags: {
  44. type: Array as PropType<string[]>,
  45. default: null
  46. },
  47. wideImage: {
  48. type: Boolean,
  49. default: false,
  50. },
  51. title1: {
  52. type: Boolean,
  53. default: false,
  54. }
  55. })
  56. </script>