123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <template>
- <div id="index">
- <el-row>
- <el-col :span="24" class="main">
- <el-col :span="24" class="top">
- <top topType="1" @search="search"></top>
- </el-col>
- <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
- <list :list="refuteList"></list>
- </el-col>
- <el-col :span="24" class="foot">
- <page limit="5" :total="total" @search="search"></page>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import list from './parts/list.vue';
- import top from '@/layout/common/top.vue';
- import page from '@/layout/common/page.vue';
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'index',
- props: {},
- components: {
- list,
- top,
- page,
- },
- data: function() {
- return {
- clientHeight: '',
- refuteList: [
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- {
- imgUrl: require('@a/news1.jpg'),
- title: '文章标题',
- renew_time: '2021-03-25 21:12:44',
- },
- ],
- total: 0,
- };
- },
- async created() {
- await this.search();
- },
- mounted() {
- let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
- this.$set(this, `clientHeight`, clientHeight);
- },
- methods: {
- search({ skip = 0, limit = 10, searchName, ...info } = {}) {
- console.log(searchName);
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- .top {
- height: 40px;
- overflow: hidden;
- border-bottom: 1px solid #f1f1f1;
- }
- .info {
- overflow-x: hidden;
- overflow-y: auto;
- }
- .foot {
- height: 40px;
- overflow: hidden;
- border-top: 1px solid #f1f1f1;
- }
- }
- </style>
|