<template>
  <div @click="$router.push({path: 'NewsDetail', query: { uuid: info.uuid, type: 'policy' }})">
    <div class=" text-base text-gray-800 font-semibold pt-5 news-title">{{ info.title }}</div>
    <!-- <p class=" text-xs text-gray-400 pt-5">{{ info.desc }}</p> -->
    <div class=" text-sm text-gray-800 text-justify pt-3 news-info">{{ info.desc }}</div>
    <div class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间：{{ $format(info.update_at, 'YYYY-MM-DD') }} &nbsp;&nbsp;&nbsp;作者: {{ info.writer }}</div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  props: {
    info: {
      type: Object
    }
  },
  setup () {
    

    return {}
  }
})
</script>

<style scoped>

  .news-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
  }
  .news-info {
    display: -webkit-box;
    overflow: hidden;  
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
  }
</style>