Browse Source

列表更新

guhongwei 5 years ago
parent
commit
3bc63f0407
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/layout/list/newsInfo.vue

+ 7 - 6
src/layout/list/newsInfo.vue

@@ -24,13 +24,11 @@
                   <p class="textOver">{{ item.title }}</p>
                 </el-col>
                 <el-col :span="4" class="date">
-                  {{ item.date }}
+                  {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
                 </el-col>
               </el-col>
             </el-col>
-            <el-col :span="17" class="content">
-              <p v-html="item.content"></p>
-            </el-col>
+            <el-col :span="17" class="content" v-html="item.content"> </el-col>
           </el-col>
         </el-col>
       </el-col>
@@ -138,8 +136,10 @@ p {
 }
 .rightList .content {
   padding: 0 10px;
+  height: 40px;
+  overflow: hidden;
 }
-/deep/.rightList .content p p {
+/deep/.rightList .content p {
   font-size: 14px;
   color: #4f4f4f;
   overflow: hidden;
@@ -148,7 +148,8 @@ p {
   word-break: break-all;
   display: -webkit-box;
   -webkit-box-orient: vertical;
-  // line-height: 25px;
+  padding: 0;
+  margin: 0;
 }
 .rightList:hover .title p {
   cursor: pointer;