Browse Source

fix: 报告列表限制title行数

hsun 2 years ago
parent
commit
1cd5810480
1 changed files with 2 additions and 0 deletions
  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]
 				}