12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <div id="list_1">
- <van-row>
- <van-col span="24" class="main">
- <van-col span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item)">
- <van-col span="24" class="title">
- {{ item.title }}
- </van-col>
- <van-col span="24" class="other">
- <van-col span="24" class="otherInfo textOver">
- 更新时间:<span>{{ item.publish_time }}</span>
- </van-col>
- <van-col span="24" class="otherInfo textOver">
- 信息来源:<span>{{ item.origin }}</span>
- </van-col>
- </van-col>
- </van-col>
- </van-col>
- </van-row>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'list_1',
- props: {
- list: { type: Array },
- },
- components: {},
- data: function() {
- return {};
- },
- created() {},
- methods: {
- detail(data) {
- this.$router.push({ path: '/live/trainInter/oneDetail', query: { id: data.id } });
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- padding: 8px 8px 0 8px;
- background-color: #f9f9f9;
- .list {
- padding: 8px;
- margin: 0 0 10px 0;
- border-radius: 8px;
- background-color: #fff;
- .title {
- font-size: 16px;
- font-weight: bold;
- margin: 0 0 5px 0;
- }
- .other {
- .otherInfo {
- font-size: 14px;
- color: #666;
- margin: 0 0 5px 0;
- span {
- color: #000;
- }
- }
- }
- }
- }
- </style>
|