瀏覽代碼

化验文字太长显示省略号

Luolei 6 年之前
父節點
當前提交
b3801745fb
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      src/components/AddInspect/index.jsx
  2. 4 0
      src/components/AddInspect/index.less

+ 1 - 1
src/components/AddInspect/index.jsx

@@ -196,7 +196,7 @@ class Inspect extends React.Component {
                     }else if(item.controlType == 6){
                         return (
                             <li className={`${styles.itemPart} ${fillActive.details.length>1?'':styles.itemPartOne}`}>
-                                <span className={styles.itemPartL}>{item.name}</span>
+                                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
                                 <span className={styles.itemPartT}>
                                     <input type="text" 
                                         placeholder="(填写)"

+ 4 - 0
src/components/AddInspect/index.less

@@ -133,6 +133,10 @@
     }
     .itemPartL {
         // width: 100px;
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
         float: left;
     }
     .itemPartR {