kunkeji
commited on
Commit
·
efb484c
1
Parent(s):
bf8dab3
Optimize the knowledge base card UI (#3756)
Browse files### What problem does this PR solve?
Set the title to 2 lines, display the excess part
Set the description to 3 lines, display the excess part


### Type of change
- [x] Other (please describe):
web/src/pages/knowledge/knowledge-card/index.less
CHANGED
|
@@ -23,6 +23,35 @@
|
|
| 23 |
.footerTop {
|
| 24 |
padding-bottom: 2px;
|
| 25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
|
| 28 |
.card {
|
|
|
|
| 23 |
.footerTop {
|
| 24 |
padding-bottom: 2px;
|
| 25 |
}
|
| 26 |
+
|
| 27 |
+
.titleWrapper {
|
| 28 |
+
margin: 16px 0;
|
| 29 |
+
overflow: hidden;
|
| 30 |
+
|
| 31 |
+
.title {
|
| 32 |
+
display: -webkit-box;
|
| 33 |
+
-webkit-line-clamp: 2;
|
| 34 |
+
-webkit-box-orient: vertical;
|
| 35 |
+
overflow: hidden;
|
| 36 |
+
font-size: 24px;
|
| 37 |
+
line-height: 32px;
|
| 38 |
+
font-weight: 600;
|
| 39 |
+
color: rgba(0, 0, 0, 0.88);
|
| 40 |
+
word-break: break-all;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.description{
|
| 44 |
+
margin-top: 4px;
|
| 45 |
+
display: -webkit-box;
|
| 46 |
+
-webkit-line-clamp: 3;
|
| 47 |
+
-webkit-box-orient: vertical;
|
| 48 |
+
overflow: hidden;
|
| 49 |
+
font-size: 12px;
|
| 50 |
+
font-weight: 600;
|
| 51 |
+
line-height: 20px;
|
| 52 |
+
color: rgba(0, 0, 0, 0.45);
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
}
|
| 56 |
|
| 57 |
.card {
|
web/src/pages/knowledge/knowledge-card/index.tsx
CHANGED
|
@@ -53,7 +53,7 @@ const KnowledgeCard = ({ item }: IProps) => {
|
|
| 53 |
</div>
|
| 54 |
<div className={styles.titleWrapper}>
|
| 55 |
<span className={styles.title}>{item.name}</span>
|
| 56 |
-
<p>{item.description}</p>
|
| 57 |
</div>
|
| 58 |
<div className={styles.footer}>
|
| 59 |
<div className={styles.footerTop}>
|
|
|
|
| 53 |
</div>
|
| 54 |
<div className={styles.titleWrapper}>
|
| 55 |
<span className={styles.title}>{item.name}</span>
|
| 56 |
+
<p className={styles.description}>{item.description}</p>
|
| 57 |
</div>
|
| 58 |
<div className={styles.footer}>
|
| 59 |
<div className={styles.footerTop}>
|