news-list-item.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="bg-white rounded-lg shadow shadow-blue-100 p-24" @click="handleClick">
  3. <uv-text type="main" bold :text="item.title"/>
  4. <uv-text type="tips" size="13" lines="2" margin="5px 0 0 0" :text="item.description"/>
  5. <view class="flex fx-bet-cen mt-20">
  6. <uv-tags size="mini" type="primary" plain :text="item.type"/>
  7. <view class="flex items-center">
  8. <view>
  9. <uv-text type="tips" size="13" prefix-icon="eye" :text="item.clicked || 456" margin="0 12px 0 0"/>
  10. </view>
  11. <view>
  12. <uv-text type="tips" size="13" prefix-icon="clock" :text="item.sendDate"/>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script setup>
  19. import {useTransfer} from "@/hooks/useTransfer";
  20. import mxConst from "@/common/mxConst";
  21. const props = defineProps({
  22. item: {
  23. type: Object,
  24. default: () => ({})
  25. }
  26. })
  27. const {transferTo} = useTransfer()
  28. function handleClick() {
  29. transferTo(mxConst.routes.newsDetail, ['id'], props.item)
  30. }
  31. </script>
  32. <style scoped>
  33. </style>