list_4.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div id="list_1">
  3. <van-row>
  4. <van-col span="24" class="main">
  5. <van-col span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item)">
  6. <van-col span="24" class="title">
  7. {{ item.title }}
  8. </van-col>
  9. <van-col span="24" class="other">
  10. <van-col span="24" class="otherInfo textOver">
  11. 更新时间:<span>{{ item.publish_time }}</span>
  12. </van-col>
  13. <van-col span="24" class="otherInfo textOver">
  14. 信息来源:<span>{{ item.origin }}</span>
  15. </van-col>
  16. </van-col>
  17. </van-col>
  18. </van-col>
  19. </van-row>
  20. </div>
  21. </template>
  22. <script>
  23. import { mapState, createNamespacedHelpers } from 'vuex';
  24. export default {
  25. name: 'list_1',
  26. props: {
  27. list: { type: Array },
  28. },
  29. components: {},
  30. data: function() {
  31. return {};
  32. },
  33. created() {},
  34. methods: {
  35. detail(data) {
  36. this.$router.push({ path: '/live/trainInter/oneDetail', query: { id: data.id } });
  37. },
  38. },
  39. computed: {
  40. ...mapState(['user']),
  41. },
  42. metaInfo() {
  43. return { title: this.$route.meta.title };
  44. },
  45. watch: {
  46. test: {
  47. deep: true,
  48. immediate: true,
  49. handler(val) {},
  50. },
  51. },
  52. };
  53. </script>
  54. <style lang="less" scoped>
  55. .main {
  56. padding: 8px 8px 0 8px;
  57. background-color: #f9f9f9;
  58. .list {
  59. padding: 8px;
  60. margin: 0 0 10px 0;
  61. border-radius: 8px;
  62. background-color: #fff;
  63. .title {
  64. font-size: 16px;
  65. font-weight: bold;
  66. margin: 0 0 5px 0;
  67. }
  68. .other {
  69. .otherInfo {
  70. font-size: 14px;
  71. color: #666;
  72. margin: 0 0 5px 0;
  73. span {
  74. color: #000;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. </style>