Преглед изворни кода

Merge branch 'dev/new1' into ChronicMag

zhangxc пре 6 година
родитељ
комит
65ef68119c
2 измењених фајлова са 5 додато и 5 уклоњено
  1. 2 2
      src/components/MultSpread/index.jsx
  2. 3 3
      src/components/SpreadDrop/index.jsx

+ 2 - 2
src/components/MultSpread/index.jsx

@@ -99,8 +99,8 @@ class MultSpread extends Component{
                             id={it.id}
                             ikey={inx} hideTag={true}></InlineTag>;
         case +it.controlType===7:
-          const min = data.minValue!=null&&data.minValue!=undefined?data.minValue-1:undefined;
-          const max = data.maxValue!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
+          const min = it.minValue!=null&&it.minValue!=undefined?it.minValue-1:undefined;
+          const max = it.maxValue!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
                              placeholder={it.name}

+ 3 - 3
src/components/SpreadDrop/index.jsx

@@ -156,7 +156,7 @@ class SpreadDrop extends Component{
 
   }
   setStateInit(){
-    const {nones,noneOn,noneIds,withOn,exists,nowOn,withs,exclusion,excluName} = deepClone(this.props.selecteds||[]);
+    const {nones,noneOn,noneIds,withOn,exists,nowOn,withs,exclusion,excluName,ban} = deepClone(this.props.selecteds||[]);
     this.setState({
       nones:nones||'',
       exists:exists||[],
@@ -167,7 +167,7 @@ class SpreadDrop extends Component{
       withOn:withOn||false,
       nowOn:nowOn||'',
       exclusion:exclusion||'',
-      ban:{},
+      ban:ban||{},
     });
   }
   clearState(){
@@ -224,7 +224,7 @@ class SpreadDrop extends Component{
       return;
     }
     //操作单选项
-    if(!noneOn&&selected){
+    if(selected){
       const tIndex= exists.findIndex((it)=>it.questionId===item.questionId);
       const bIndex= withs.findIndex((it)=>it.questionId===item.questionId);
       if(tIndex!=-1){