Przeglądaj źródła

单列单选bug

Luolei 6 lat temu
rodzic
commit
b9d198faa5

+ 0 - 2
src/components/CheckBody/index.jsx

@@ -57,11 +57,9 @@ class CheckBody extends Component{
     const {fetchPushInfos,totalHide,getSearchLocation} = this.props;
     //fetchPushInfos&&fetchPushInfos();
     this.getData();
-    console.log(1111111111111)
     if(totalHide){
       return ;
     }
-    console.log(22222222222222)
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
     
     let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置

+ 3 - 13
src/components/Multiple/index.jsx

@@ -1,7 +1,6 @@
 import react from "react";
 import style from "./index.less";
 import $ from 'jquery';
-import ReactDom from "react-dom";
 import classNames from 'classnames';
 import {handleEnter,isIE,filterArr,deepClone,filterDataArr} from '@utils/tools.js';
 import {Notify} from '@commonComp';
@@ -197,20 +196,11 @@ class Multiple extends react.Component{
       },this);
     }
   }
-  getStyle(){
-    const {left,top,show} = this.props;
-    console.log(left,333333333333)
-    return {
-      left:left?left+'px':'0',
-      top:top?top+'px':'0',
-      display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
-    }
-  }
+
   render(){
     const {placeholder,value,show,data} = this.props;
     const {editable,boxTop,boxLeft} = this.state;
-    const domNode = document.getElementById('root');
-    return ReactDom.createPortal(<div className={style["container"]} style={this.getStyle()}>
+    return <div className={style["container"]}>
       <div className={this.getClass()}
       ref={this.$div}
       onClick={this.handleShow}
@@ -229,7 +219,7 @@ class Multiple extends react.Component{
         </ul>
         
       </div>
-    </div>,domNode)
+    </div>
   }
 
 }