Commit a98cb273b26881fd6009d0145e295e2eeccc8b5a
1 parent
06419a7d
优化设备维修样式;
Showing
2 changed files
with
22 additions
and
5 deletions
src/mes/serviceUpkeep/equipmentRepair/index.js
| ... | ... | @@ -92,14 +92,14 @@ const EquipmentInfo = props => { |
| 92 | 92 | const { sMachineNo, sMachineName } = viewRow; |
| 93 | 93 | return ( |
| 94 | 94 | <div className={styles.equipmentInfo}> |
| 95 | - <div className={styles.title}>{getEquipmentTranslation(app, "设备信息")}</div> | |
| 95 | + <div className={styles.title}><span title={getEquipmentTranslation(app, "设备信息")}>{getEquipmentTranslation(app, "设备信息")}</span></div> | |
| 96 | 96 | <div className={styles.image} /> |
| 97 | 97 | <div className={styles.info}> |
| 98 | 98 | <div className={styles.content}> |
| 99 | 99 | <div>{getEquipmentTranslation(app, "设备编号")}:</div> |
| 100 | 100 | <div>{sMachineNo}</div> |
| 101 | 101 | <div>{getEquipmentTranslation(app, "设备名称")}:</div> |
| 102 | - <div>{sMachineName}</div> | |
| 102 | + <div><span title={sMachineName}>{sMachineName}</span></div> | |
| 103 | 103 | </div> |
| 104 | 104 | </div> |
| 105 | 105 | </div> |
| ... | ... | @@ -159,7 +159,7 @@ const EquipmentFaultAnalysis = props => { |
| 159 | 159 | |
| 160 | 160 | return ( |
| 161 | 161 | <div className={styles.equipmentFaultAnalysis}> |
| 162 | - <div className={styles.title}>{title}</div> | |
| 162 | + <div className={styles.title}><span title={title}>{title}</span></div> | |
| 163 | 163 | <div className={styles.charts}> |
| 164 | 164 | {pieProps.data.length ? ( |
| 165 | 165 | <Pie {...pieProps} /> | ... | ... |
src/mes/serviceUpkeep/equipmentRepair/index.less
| ... | ... | @@ -48,7 +48,19 @@ |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | >div:nth-of-type(4) { |
| 51 | - .flex(flex-start, flex-start) | |
| 51 | + display: -webkit-box; | |
| 52 | + /*! autoprefixer: ignore next */ | |
| 53 | + -webkit-box-orient: vertical; | |
| 54 | + -webkit-line-clamp: 2; | |
| 55 | + /* 只保留 2 行 */ | |
| 56 | + overflow: hidden; | |
| 57 | + text-overflow: ellipsis; | |
| 58 | + /* 兜底 */ | |
| 59 | + white-space: normal; | |
| 60 | + word-break: break-all; | |
| 61 | + /* 覆盖 antd 默认 nowrap */ | |
| 62 | + /* 按需调整,决定何时断行 */ | |
| 63 | + line-height: 1.2; | |
| 52 | 64 | } |
| 53 | 65 | } |
| 54 | 66 | } |
| ... | ... | @@ -59,10 +71,15 @@ |
| 59 | 71 | |
| 60 | 72 | .title { |
| 61 | 73 | .size(100%, 40px); |
| 62 | - .flex(center); | |
| 74 | + // .flex(center); | |
| 63 | 75 | font-size: 20px; |
| 64 | 76 | color: #1890ff; |
| 65 | 77 | font-weight: bold; |
| 78 | + // 超出省略号 | |
| 79 | + white-space: nowrap; | |
| 80 | + overflow: hidden; | |
| 81 | + text-overflow: ellipsis; | |
| 82 | + text-align: center; | |
| 66 | 83 | } |
| 67 | 84 | |
| 68 | 85 | .charts { | ... | ... |