|
@@ -235,6 +235,10 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
|
|
|
const newVal = changeVal; //下拉修改的内容
|
|
|
let labText = totalVal?totalVal:newVal; //如单选没有前后缀
|
|
|
let item = res.data[index];
|
|
|
+ const next = res.data[+index+1];
|
|
|
+ const nextVal = next.value||next.name;
|
|
|
+ //标签后是不是标点符号标签,是的话删除本标签时一起删除
|
|
|
+ let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
|
|
|
// if(newVal && newVal.trim()){
|
|
|
if(labText && labText.trim()){
|
|
|
if(item){
|
|
@@ -245,7 +249,8 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
|
|
|
res.saveText[index] = labText;
|
|
|
}
|
|
|
}else{//删除完标签内容则删除该标签
|
|
|
- res.data.splice(index,1);
|
|
|
+ const num = nextIsDot?2:1;
|
|
|
+ res.data.splice(index,num);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
}
|
|
|
res.update = Math.random();
|
|
@@ -259,6 +264,10 @@ export const changeNumLabelVal = (state,action)=>{
|
|
|
const index = ikey;
|
|
|
const newVal = changeVal;
|
|
|
let item = res.data[index];
|
|
|
+ const next = res.data[+index+1];
|
|
|
+ const nextVal = next.value||next.name;
|
|
|
+ //标签后是不是标点符号标签,是的话删除本标签时一起删除
|
|
|
+ let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
|
|
|
if(totalVal.trim()){
|
|
|
if(item){
|
|
|
item.value = newVal;
|
|
@@ -267,7 +276,8 @@ export const changeNumLabelVal = (state,action)=>{
|
|
|
}
|
|
|
res.saveText[index] = totalVal;
|
|
|
}else{//删除完标签内容则删除该标签
|
|
|
- res.data.splice(index,1);
|
|
|
+ const num = nextIsDot?2:1;
|
|
|
+ res.data.splice(index,num);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
}
|
|
|
|