瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

1 year ago
1 year ago
11 months ago
10 months ago
11 months ago
11 months ago
1 year ago
11 months ago
10 months ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="works" @click="$emit('click')">
  3. <userHeadItem :item="item" />
  4. <daynamicInfo :item="item" />
  5. <dynamicToShop
  6. :shop="item.shop"
  7. />
  8. <statisticalDataInfo
  9. :item="item"
  10. type="0"
  11. />
  12. <!-- 评论列表组件 -->
  13. <commentList
  14. :comments="item.comments"
  15. :hasMoreComments="item.isComment > item.comments.length"
  16. @goToDetail="handleGoToDetail"
  17. v-if="item.comments && item.comments.length > 0"
  18. />
  19. </view>
  20. </template>
  21. <script>
  22. import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
  23. import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
  24. import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
  25. import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
  26. import commentList from '@/components/list/dynamic/commentList.vue'
  27. import visibilityObserver from '@/mixins/visibilityObserver.js'
  28. export default {
  29. mixins: [visibilityObserver],
  30. components: {
  31. userHeadItem,
  32. daynamicInfo,
  33. statisticalDataInfo,
  34. dynamicToShop,
  35. commentList,
  36. },
  37. props: {
  38. item: {},
  39. },
  40. methods: {
  41. handleGoToDetail() {
  42. // 触发父组件事件,传递当前item数据
  43. this.$emit('goToDetail', this.item)
  44. }
  45. },
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .works {
  50. margin: 40rpx 20rpx;
  51. background-color: #fff;
  52. padding: 40rpx;
  53. border-radius: 20rpx;
  54. box-shadow: 0 0 6rpx 6rpx #00000011;
  55. }
  56. </style>