Explorar o código

fix: 报告列表限制title行数

hsun %!s(int64=2) %!d(string=hai) anos
pai
achega
1cd5810480
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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]
 				}