luolei 5 年之前
父节点
当前提交
0830f68c25
共有 2 个文件被更改,包括 14 次插入10 次删除
  1. 12 8
      src/components/RadioInpDrop/index.jsx
  2. 2 2
      src/utils/config.js

+ 12 - 8
src/components/RadioInpDrop/index.jsx

@@ -153,7 +153,7 @@ class InputComp extends Component{
     // FF26 只有innerHTML
     const text = e.target.innerText || e.target.innerHTML;
     const {handleBlur,index} = this.props;
-    e.target.innerHTML = '';
+    // e.target.innerHTML = '';
     // FF26 会把  也获取到
     handleBlur(index,text.replace(' ',''));
   }
@@ -191,15 +191,19 @@ class InputComp extends Component{
     }
     this.over=false;
   }
-  componentWillReceiveProps(next){
-    //超过限制时,再点开下拉被删除的输入文字又出现bug修改
+  componentDidMount(){
+    const {value} = this.props;
     const inp = this.$inp.current;
-    const value = next.value;
-    inp.innerHTML = '';
-    setTimeout(function(){
-      inp.innerHTML = value;
-    });
+    inp.innerHTML = value
   }
+  // componentWillReceiveProps(next){
+  //   //超过限制时,再点开下拉被删除的输入文字又出现bug修改
+  //   const inp = this.$inp.current;
+  //   const value = next.value;
+  //   setTimeout(function(){
+  //     inp.innerHTML = value
+  //   });
+  // }
   render(){
     const {value} = this.props;
     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.100: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.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚