listFour.vue 551 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view class="data-content-item">
  3. <view class="list-time-box">
  4. <view class="time-data">{{ formatDate[1] }}</view>
  5. <view class="time-year">{{ formatDate[0] }}</view>
  6. </view>
  7. <p v-html="data.title"></p>
  8. </view>
  9. </template>
  10. <script setup>
  11. import {
  12. formatDateToYearMonthDay
  13. } from "@/utils/common.js"
  14. import {
  15. computed
  16. } from "vue"
  17. const props = defineProps({
  18. data: {
  19. type: Object
  20. }
  21. })
  22. const formatDate = computed(() => {
  23. return formatDateToYearMonthDay(props.data.createTime)
  24. })
  25. </script>
  26. <style>
  27. </style>