Sfoglia il codice sorgente

修改列表 去掉图片

asd123a20 2 anni fa
parent
commit
e7e94b6f5a
4 ha cambiato i file con 38 aggiunte e 60 eliminazioni
  1. 1 1
      src/components/pagination.vue
  2. 1 1
      src/views/details.vue
  3. 35 57
      src/views/list.vue
  4. 1 1
      src/views/pages.vue

+ 1 - 1
src/components/pagination.vue

@@ -15,7 +15,7 @@ export default {
   components: {},
   props: {
     total: { type: Number, default: 0 },
-    pageSize: { type: Number, default: 10 }
+    pageSize: { type: Number, default: 20 }
   },
   data() {
     return {

+ 1 - 1
src/views/details.vue

@@ -3,7 +3,7 @@
     <breadcrumb ref="breadcrumb"></breadcrumb>
     <div ref="detailsHome" class="detailsHome" v-if="contentsItem">
       <img class="thumbnail" v-if="isshow" :src="contentsItem.thumbnail">
-      <h3 class="title">{{ contentsItem.title }}</h3>
+      <h2 class="title">{{ contentsItem.title }}</h2>
       <h4 class="title" v-if="contentsItem && contentsItem.curtTitle">{{ contentsItem.curtTitle }}</h4>
       <!-- <span class="describe">{{ contentsItem.describe }}</span> -->
       <span class="date">发表时间: {{ contentsItem.date | dates }}<span class="visit" v-if="contentsItem.source">来源: {{ contentsItem.source }}</span><span class="visit">访问量: {{ contentsItem.visit }}</span></span>

+ 35 - 57
src/views/list.vue

@@ -6,19 +6,12 @@
         <letnav ref="letnav" :menuTree="menu"></letnav>
       </div>
       <div class="box" v-if="!isnew">
-        <div class="listBoxRight"  v-if="listTotal > 0">
-          <el-card class="listBox" v-for="(item, index) in contentList" :key="index">
-            <el-image v-if="item && item.thumbnail" :src="item.thumbnail" class="listimg" @click="newClick(item)"></el-image>
-            <el-image v-else :src="thumbnail" class="listimg" @click="newClick(item)"></el-image>
-            <div class="text">
-              <div class="title" @click="newClick(item)">{{ item.title }}</div>
-              <span class="describe" v-if="item.describe">{{ item.describe }}</span>
-              <span class="date">{{ item.date | dates }}</span>
-            </div>
-          </el-card>
-          <pagination ref="pagination" class="pagination" :total="listTotal" @query="filterQuery"></pagination>
+        <div class="text" v-for="(item, index) in contentList" :key="index">
+          <el-image class="jt" :src="icon"></el-image>
+          <div class="title" @click="newClick(item)">{{ item.title }}</div>
+          <span class="date">{{ item.date | dates }}</span>
         </div>
-        <el-divider class="divider" v-else>暂无数据</el-divider>
+        <pagination ref="pagination" class="pagination" :total="listTotal" @query="filterQuery"></pagination>
       </div>
       <div class="isnewbox" v-if="isnew">
         <div class="titlebox" v-for="(item, index) in isnewcontentList" :key="index">
@@ -59,7 +52,8 @@ export default {
       parentCode: null,
       menu: {},
       thumbnail: require('../assets/newimg.jpg'),
-      isnew: false
+      isnew: false,
+      icon: require('../assets/jt.png')
     };
   },
   async mounted() {
@@ -86,7 +80,7 @@ export default {
   methods: {
     ...mapActions(['contentsList', 'menusQueryAll']),
     // 查询函数
-    async filterQuery ({ filter = {}, paging = { page: 0, size: 10 } } = {}) {
+    async filterQuery ({ filter = {}, paging = { page: 0, size: 20 } } = {}) {
       filter.bind = this.code;
       if (this.code.length == 2 && this.menu.children) filter.parentCode = this.code;
       await this.contentsList({ filter, paging });
@@ -137,54 +131,38 @@ export default {
       width: 75%;
       margin-top: 3%;
     }
-    .listBoxRight {
-      width: 100%;
-      .listBox {
-        width: 100%;
-        margin: 0 auto;
-        margin-bottom: 3%;
-        background: #f5f9ff;
-        ::v-deep .el-card__body {
+    .box {
+      .text {
           display: flex;
-          // padding: 10px 20px !important;
-          .listimg {
-            display: block;
-            width: 15%;
-            height: 5%;
+          width: 100%;
+          margin-bottom: 5px;
+          border-bottom: 1px dashed #999;
+          .jt {
+            width: 10px;
+            height: 10px;
+            vertical-align: middle;
+            margin-top: 1%;
+            margin-left: 5px;
+          }
+          .title {
+            margin-left: 5px;
             cursor: pointer;
+            width: 85%;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            font-size: 16px;
+            line-height: 30px;
+            font-weight: 600;
           }
-          .text {
-            width: 70%;
-            margin-left: 5%;
-            .title {
-              cursor: pointer;
-              width: 100%;
-              overflow: hidden;
-              text-overflow: ellipsis;
-              white-space: nowrap;
-              font-size: 16px;
-              line-height: 30px;
-              font-weight: 600;
-            }
-            .describe {
-              width: 100%;
-              overflow: hidden;
-              text-overflow: ellipsis;
-              display: -webkit-box;
-              -webkit-line-clamp: 2;
-              -webkit-box-orient: vertical;
-              color: #999;
-              font-size: 14px;
-            }
-            .date {
-              width: 100%;
-              color: #999;
-              line-height: 2em;
-              font-size: 14px;
-            }
+          .date {
+            width: 10%;
+            color: #999;
+            line-height: 2em;
+            font-size: 14px;
+            text-align: right;
           }
         }
-      }
     }
   }
   .pagination {

+ 1 - 1
src/views/pages.vue

@@ -6,7 +6,7 @@
         <letnav ref="letnav" :menuTree="menu"></letnav>
       </div>
       <div class="listBoxRight">
-        <h3 class="title">{{ pagesItem.title }}</h3>
+        <h2 class="title">{{ pagesItem.title }}</h2>
         <!-- <span class="describe">{{ pagesItem.describe }}</span> -->
         <span class="date">发表时间: {{ pagesItem.date | dates }}<span class="visit">访问量: {{ pagesItem.visit }}</span></span>
         <div class="content" v-html="pagesItem.content"></div>