Skip to content

Commit

Permalink
隐藏多行内容
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed May 28, 2024
1 parent 715590d commit 49c9ab7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/universities/main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ then set (next <input/>).value to my.value2
th "报考编码"
th "大学名称(点击名称编辑)"
th "录取批次"
th "备注"
th "备注(如专业等,可模糊搜索)"
order_by_score_description_2023 = "点击排序(低分优先)"
order_by_score_description_2022 = "点击排序(低分优先)"
order_by_score_description_2021 = "点击排序(低分优先)"
Expand Down Expand Up @@ -292,7 +292,7 @@ then set (next <input/>).value to my.value2
link university.name, Edit.with(university), "hx-boost": "false"
end
td university.batch_level.display_name
td style: "max-width: 100px;" do
td style: "max-width: 100px;", class: "double-line" do
text university.description.to_s
end
mount(
Expand Down
16 changes: 16 additions & 0 deletions src/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,19 @@ p.range-field {
flex-flow: row nowrap;
align-items: center;
}


.double-line {
word-break: break-all;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

.singe-line {
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
}

0 comments on commit 49c9ab7

Please sign in to comment.