Ver código fonte

修改右侧辅助信息高度

zhangxc 6 anos atrás
pai
commit
968b2eb1ad

+ 4 - 1
src/components/MedicalInfo/index.jsx

@@ -26,11 +26,14 @@ class MedicalInfo extends Component {
             });
     }
     search(){
+      console.log('val1')
       const {handleChangeValue} = this.props;
       const val = this.$inp.current.value;
+      console.log('val',val)
       handleChangeValue&&handleChangeValue(val);
     }
   handleChange(){
+      console.log('change')
       this.setState({
         val:this.$inp.current.value
       });
@@ -59,7 +62,7 @@ class MedicalInfo extends Component {
             <div className={style['search-cont']}>
                 <p className={style['title']}>医学知识搜索</p>
                 <p className={style['cont']}>
-                  <input type="text" className={style['input']} ref={this.$inp} onChange={this.handleChange}/>
+                  <input type="text" className={style['input']} ref={this.$inp} />
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                   <button onClick={this.search}>搜索</button>
                 </p>

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

@@ -128,11 +128,11 @@ class PushItems extends Component {
   }
 
   componentDidMount() {
-    const height = getWindowInnerHeight() - 200;
+    const height = getWindowInnerHeight() - 180;
     this.$cont.current.style.height = height + "px";
 
     windowEventHandler('resize', ()=>{
-      const height = getWindowInnerHeight() - 200;
+      const height = getWindowInnerHeight() - 180;
       this.$cont.current.style.height = height + "px";
     });
   }