浏览代码

既往史无殊选中bug

zhouna 6 年之前
父节点
当前提交
b489e5280c
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/store/actions/otherHistory.js

+ 7 - 0
src/store/actions/otherHistory.js

@@ -6,6 +6,13 @@ export const confirm = (state,action) =>{
   let res = Object.assign({},state);
   let res = Object.assign({},state);
   let arr = res.data;
   let arr = res.data;
   const {nones,exists,withs,ikey,exclusion,excluName,copyType} = action.data;
   const {nones,exists,withs,ikey,exclusion,excluName,copyType} = action.data;
+  if((!exists||!withs||[...exists,...withs].length==0)&&!nones&&!exclusion){       //取消无殊的选中,空白提交
+    arr[ikey].value = '';
+    res.saveText[ikey] = '';
+    res.selecteds.splice(ikey,1);
+    res.update=Math.random();
+    return res;
+  }
   //选中互斥项
   //选中互斥项
   if(exclusion){
   if(exclusion){
     arr[ikey].value = excluName;
     arr[ikey].value = excluName;