|
@@ -820,10 +820,12 @@ export const clearCurrentEdit = (state,action)=>{
|
|
|
export function addLabelItem(state,action){
|
|
|
let res = Object.assign({},state);
|
|
|
const {data,i} = action;
|
|
|
- const textLabel = JSON.parse(config.textLabel);
|
|
|
+ const textLabel = Object.assign({},JSON.parse(config._textLabel),{showInCheck:JSON.parse(data).showInCheck});
|
|
|
//使用Object.assign({},data)拷贝操作时复制项和原项会同步修改
|
|
|
if(!data) return res;
|
|
|
- res.data.splice(i+1,0,JSON.parse(data),textLabel);
|
|
|
+ res.data.splice(+i+2,0,JSON.parse(data),textLabel);
|
|
|
+ res.saveText.splice(+i+2,0,'','');
|
|
|
+ res.selecteds.splice(+i+2,0,null,null);
|
|
|
res.update = Math.random();
|
|
|
return res;
|
|
|
}
|