wsx 11 месяцев назад
Родитель
Сommit
ced55d4fc9
1 измененных файлов с 9 добавлено и 7 удалено
  1. 9 7
      src/views/home/index.vue

+ 9 - 7
src/views/home/index.vue

@@ -542,7 +542,7 @@
           size: 9999,
           userId: this.user.info.userId
         });
-        this.messageScrollList = deepClone(list);
+        this.messageScrollList = deepClone(list);  
       },
       errorHandler(err, vm) {
         console.log('图片加载失败');
@@ -1184,7 +1184,7 @@
         justify-content: flex-start;
 
         .item-date {
-          width: 30%;
+          width: 100%;
           color: #979c9e;
           font-size: 0.7vw;
           line-height: 16px;
@@ -1195,15 +1195,17 @@
         }
 
         .item-text {
-          width: 80%;
+          width: 100%;
           color: #555555;
           font-size: 0.7vw;
-
           line-height: 16px;
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
           margin: 5px 0 0 0px;
+          overflow: hidden; /* 隐藏溢出内容 */
+          text-overflow: ellipsis; /* 溢出内容用省略号表示 */
+          display: -webkit-box; /* 采用 WebKit 的盒子模型 */
+          -webkit-box-orient: vertical; /* 垂直排列子元素 */
+          -webkit-line-clamp: 5; /* 限制显示的行数为 3 行 */
+          word-break: break-word;
         }
       }
     }