Bläddra i källkod

滚动padding值的显示隐藏

luolei 5 år sedan
förälder
incheckning
2f64cab7f5

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

@@ -91,7 +91,11 @@ class AddAssistCheck extends React.Component {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
     // e.stopPropagation(); 
-    setPosition(e,"#searchOption",this.props.setHighter)   
+    if(tmpShow){
+      this.props.setHighter(10)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)   
+    }
   }
   handleShowDate(idx) {
     this.setState({

+ 5 - 1
src/components/AddInspect/index.jsx

@@ -134,7 +134,11 @@ class Inspect extends React.Component {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
-    setPosition(e,"#searchOption",this.props.setHighter)
+    if(tmpShow){
+      this.props.setHighter(10)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
   }
   handleFillShow(e, idx) {
     let tmpShow = this.state.showFill;

+ 5 - 1
src/components/Diagnosis/index.jsx

@@ -38,7 +38,11 @@ class Diagnosis extends Component {
   handleshowSearch(e) {
     this.props.show ? this.hideSearch() : this.showSearch()
     this.setState({ pageTop:getPageCoordinate(e).boxTop })
-    setPosition(e,"#searchOption",this.props.setHighter)
+    if(this.props.show){
+      this.props.setHighter(10)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
   }
   refreshScroller(){
     //更新滚动条状态,解决容器变大滚动条不更新bug