<template>
  <div id="info-1">
    <van-row>
      <van-col span="24" class="main">
        <van-col :span="24" class="one">
          <van-col :span="24" class="name">
            {{ info.title }}
          </van-col>
          <van-col :span="24" class="other">
            <van-col :span="24" class="otherInfo">
              信息来源：<span>{{ info.origin }}</span>
            </van-col>
            <van-col :span="24" class="otherInfo">
              发布时间：<span>{{ info.publish_time }}</span>
            </van-col>
          </van-col>
          <van-col :span="24" class="content">
            <p v-html="info.content"></p>
          </van-col>
          <el-col :span="24" class="filepath" v-if="info.filepath">
            <el-link :href="info.filepath.url" type="primary">{{ info.filepath.name }}</el-link>
          </el-col>
        </van-col>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info-1',
  props: {
    info: { ttype: Object },
  },
  components: {},
  data: function () {
    return {};
  },
  created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    padding: 8px;
    .name {
      font-size: 16px;
      font-weight: bold;
      margin: 0 0 5px 0;
      text-align: center;
    }
    .other {
      .otherInfo {
        font-size: 14px;
        margin: 0 0 5px 0;
        color: #666;
        span {
          color: #000;
        }
      }
    }
    .filepath {
      margin: 20px 0 0 0;
    }
  }
}
</style>
