Przeglądaj źródła

更新滚动条

luolei 4 lat temu
rodzic
commit
f0d2507223

+ 7 - 4
src/components/AddNewInspect/index.jsx

@@ -78,17 +78,20 @@ class AddNewInspect extends React.Component {
       let searchWrap = document.getElementById("searchWrapAdvice");   // 搜索按钮
       let searchOption = document.getElementById("searchOption");   // 搜索列表
       let inspectFill = document.getElementById("inspectFill");         // 公共填写单
-
+      const {refreshScroller} = this.props
+      refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       let _del = $('#delBox')[0];       // 删除弹窗  
       let _impClose = $('#impClose')[0];         // 导入删除按钮
       let _addClose = $('#addClose')[0];         // 添加删除按钮
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (searchOption&&!this.isBar) {//onMousedown的目标为滚动条时,添加弹窗不关闭
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
-          if(this.state.show){
+          this.setState({ show: false },()=>{
             this.props.setHighter(48)
-          }
-          this.setState({ show: false });
+            setTimeout(function(){
+              refreshScroller()&&refreshScroller().scrollBottom();
+            },100);
+          });
         }
       }
       if (inspectFill&&!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭

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

@@ -43,7 +43,7 @@ class BlockEMRCont extends Component {
   }
 
   setHighter(ht){
-    // console.log(this.$div.current.scrollHeight);
+    // console.log(this.$div.current.scrollHeight,ht,'-=-=-=-------');
     if(this.$div.current){
       this.$div.current.style.paddingBottom = ht+'px';
     }