Quellcode durchsuchen

Merge branch 'dev5.3.3' into dev/new1

luolei vor 5 Jahren
Ursprung
Commit
5234712529
2 geänderte Dateien mit 12 neuen und 1 gelöschten Zeilen
  1. 4 0
      src/components/AddInspect/index.less
  2. 8 1
      src/store/actions/checkBody.js

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

@@ -159,10 +159,14 @@
             text-align: center;
             float: left;
             margin-right: 10px;
+            height: 28px;
+            line-height: 28px;
         }
         .unit {
             display: inline-block;
             width: 70px;
+            height: 28px;
+            line-height: 28px;
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;

+ 8 - 1
src/store/actions/checkBody.js

@@ -236,7 +236,14 @@ export function backspaceText(state,action){
       res.saveText.splice(delIndex,1);
     }else{
       handleLocalDelTag(4,inx,data[inx]);
-      const n = action.text.length>0&&(config.punctuationReg.test(action.text))?1:2;
+      let n = ''
+      if(action.text==' '){
+        n = 2
+      }else if(action.text.length>0&&(config.punctuationReg.test(action.text))){
+        n = 1
+      }else{
+        n = 2
+      }
       data.splice(inx,n);
       res.saveText.splice(inx,n);
     }