|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
@@ -196,11 +197,20 @@ 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;
|
|
|
- return <div className={style["container"]}>
|
|
|
+ const domNode = document.getElementById('root');
|
|
|
+ return ReactDom.createPortal(<div className={style["container"]} style={this.getStyle()}>
|
|
|
<div className={this.getClass()}
|
|
|
ref={this.$div}
|
|
|
onClick={this.handleShow}
|
|
@@ -219,7 +229,7 @@ class Multiple extends react.Component{
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>,domNode)
|
|
|
}
|
|
|
|
|
|
}
|