فهرست منبع

Merge branch 'dev/new1' into dev5.3.3

luolei 5 سال پیش
والد
کامیت
23c5665e95
4فایلهای تغییر یافته به همراه10 افزوده شده و 9 حذف شده
  1. 3 3
      src/store/actions/checkBody.js
  2. 2 2
      src/store/actions/currentIll.js
  3. 2 1
      src/store/actions/mainSuit.js
  4. 3 3
      src/store/actions/otherHistory.js

+ 3 - 3
src/store/actions/checkBody.js

@@ -246,9 +246,9 @@ export function backspaceText(state,action){
     }
     else{
       handleLocalDelTag(4,delIndex-1,data[delIndex-1]);
-      data.splice(delIndex-1,action.text.length>0?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0?1:2); 
-      res.saveText.splice(delIndex-1,action.text.length>0?1:2);
+      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
+      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2); 
+      res.saveText.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
     }
   }else if(flag == 'del'){
     if(data[delIndex+1] && data[delIndex+1].flag&&data[delIndex+1].flag==3){//子模板不删  

+ 2 - 2
src/store/actions/currentIll.js

@@ -659,8 +659,8 @@ export function backspaceText(state,action){
     }
     else{
       handleLocalDelTag(2,delIndex-1,data[delIndex-1]);
-      data.splice(delIndex-1,action.text.length>0?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0?1:2); 
+      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
+      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2); 
       res.saveText.splice(delIndex-1,2);
     }
   }else if(flag == 'del'){

+ 2 - 1
src/store/actions/mainSuit.js

@@ -696,7 +696,8 @@ export function backspaceText(state,action){
     else{
       handleLocalDelTag(1,delIndex-1,data[delIndex-1]);
       // data.splice(delIndex-1,2);
-      data.splice(delIndex-1,action.text.length>0?1:2);//data不为空不能清除
+      console.log(config.punctuationReg.test(action.text),action.text)
+      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);//data不为空不能清除
       res.saveText.splice(delIndex-1,action.text.length>0?1:2);
     }
   }else if(flag == 'del'){

+ 3 - 3
src/store/actions/otherHistory.js

@@ -282,9 +282,9 @@ export function backspaceText(state,action){
         res[data[delIndex-1].formulaCode]=undefined;
       }
       handleLocalDelTag(3,delIndex-1,data[delIndex-1]);      //记录被删除的标签
-      data.splice(delIndex-1,action.text.length>0?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0?1:2);      //杂音类样式选中状态对应
-      res.saveText.splice(delIndex-1,action.text.length>0?1:2);
+      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
+      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);      //杂音类样式选中状态对应
+      res.saveText.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
     }
   }else if(flag == 'del'){
     if(data[delIndex+1] && data[delIndex+1].flag&&data[delIndex+1].flag==3){//子模板不删