|
@@ -377,7 +377,10 @@ export const changeNumLabelVal = (state,action)=>{
|
|
|
const newVal = changeVal;
|
|
|
let item = res.data[index];
|
|
|
const next = res.data[+index+1];
|
|
|
+ const next2 = res.data[+index + 2];
|
|
|
const nextVal = next.value||next.name;
|
|
|
+ //下一个非文本标签是数字组件
|
|
|
+ const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
|
|
|
//标签后是不是标点符号标签,是的话删除本标签时一起删除
|
|
|
let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
|
|
|
let labText = totalVal?totalVal:newVal; //如单选没有前后缀
|
|
@@ -389,7 +392,11 @@ export const changeNumLabelVal = (state,action)=>{
|
|
|
}
|
|
|
res.saveText[index] = labText;
|
|
|
}else{//删除完标签内容则删除该标签
|
|
|
- const num = nextIsDot?2:1;
|
|
|
+ let num = nextIsDot ? 2 : 1;
|
|
|
+ if (nextIsDot && next2IsNum) { //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
|
|
|
+ next.value = '';
|
|
|
+ num = 1;
|
|
|
+ }
|
|
|
res.data.splice(index,num);
|
|
|
res.selecteds.splice(index,num);//杂音类样式选中状态对应
|
|
|
res.saveText = fullfillText(res.data).saveText;
|