Browse Source

单选带输入框bug2943

luolei 5 years ago
parent
commit
0f569703b1

+ 1 - 1
src/components/AddAssistCheck/index.jsx

@@ -38,7 +38,7 @@ class AddAssistCheck extends React.Component {
       let _close = document.getElementById("assiClose");   // 删除icon
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
       if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
-          if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+          if (_con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
             if (this.state.show) {
             if (this.state.show) {
               this.props.setHighter(48)
               this.props.setHighter(48)
             }
             }

+ 15 - 10
src/components/RadioInpDrop/index.jsx

@@ -153,7 +153,7 @@ class InputComp extends Component{
     // FF26 只有innerHTML
     // FF26 只有innerHTML
     const text = e.target.innerText || e.target.innerHTML;
     const text = e.target.innerText || e.target.innerHTML;
     const {handleBlur,index} = this.props;
     const {handleBlur,index} = this.props;
-    e.target.innerHTML = '';
+    // e.target.innerHTML = '';
     // FF26 会把  也获取到
     // FF26 会把  也获取到
     handleBlur(index,text.replace(' ',''));
     handleBlur(index,text.replace(' ',''));
   }
   }
@@ -191,15 +191,20 @@ class InputComp extends Component{
     }
     }
     this.over=false;
     this.over=false;
   }
   }
-  componentWillReceiveProps(next){
-    //超过限制时,再点开下拉被删除的输入文字又出现bug修改
-    const inp = this.$inp.current;
-    const value = next.value;
-    inp.innerHTML = '';
-    setTimeout(function(){
-      inp.innerHTML = value;
-    });
-  }
+  componentDidMount(){
+    const {value} = this.props;
+    const inp = this.$inp.current;
+    inp.innerHTML = value
+  }
+  // componentWillReceiveProps(next){
+  //   //超过限制时,再点开下拉被删除的输入文字又出现bug修改
+  //   const inp = this.$inp.current;
+  //   const value = next.value;
+  //   inp.innerHTML = '';
+  //   setTimeout(function(){
+  //     inp.innerHTML = value;
+  //   });
+  // }
   render(){
   render(){
     const {value} = this.props;
     const {value} = this.props;
     return <span contentEditable={true}
     return <span contentEditable={true}

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
+// const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 3 - 0
src/utils/tools.js

@@ -557,6 +557,9 @@ function filterArr(arr){
 }
 }
 
 
 function filterDataArr(arrTmp){   //数据处理
 function filterDataArr(arrTmp){   //数据处理
+    if(!Array.isArray(arrTmp)){
+      return
+    }
     let tmpArr = [];
     let tmpArr = [];
     tmpArr = arrTmp.map((it,i)=>{     //连续的标点符号保留第一个
     tmpArr = arrTmp.map((it,i)=>{     //连续的标点符号保留第一个
       if(!it)return '';
       if(!it)return '';