Ver Fonte

fix: 报告列表限制title行数

hsun há 2 anos atrás
pai
commit
1cd5810480
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      services/report/report.go

+ 2 - 0
services/report/report.go

@@ -689,6 +689,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 				if len(v.Highlight["Title"]) > 0 {
 					temp.Title = v.Highlight["Title"][0]
 				}
+				// 样式限制行数
+				temp.Title = "<div style=\"-webkit-line-clamp: 3;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">" + temp.Title + "</div>"
 				if len(v.Highlight["Abstract"]) > 0 {
 					temp.Abstract = v.Highlight["Abstract"][0]
 				}