|
@@ -4,6 +4,7 @@ import $ from 'jquery';
|
|
|
import classNames from 'classnames';
|
|
|
import {handleEnter,isIE,filterArr,deepClone,filterDataArr} from '@utils/tools.js';
|
|
|
import {Notify} from '@commonComp';
|
|
|
+import ReactDom from "react-dom";
|
|
|
import config from '@config/index.js';
|
|
|
/**
|
|
|
单列多选组件(tagtype=1,controlType=2)
|
|
@@ -196,10 +197,19 @@ class Multiple extends react.Component{
|
|
|
},this);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ getStyle(){
|
|
|
+ const {left,top,show} = this.props;
|
|
|
+ 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}
|
|
@@ -208,7 +218,7 @@ class Multiple extends react.Component{
|
|
|
onBlur={this.handleBlur}
|
|
|
onInput={this.onChange}
|
|
|
onkeydown={handleEnter}
|
|
|
- contentEditable={editable}>{value||placeholder}</div>
|
|
|
+ contentEditable={editable}>sss{value||placeholder}</div>
|
|
|
<div className={this.getListClass()} style={{top:boxTop,left:boxLeft}} contentEditable="false">
|
|
|
<ul>
|
|
|
{data&&data.map((it)=>{
|
|
@@ -220,6 +230,7 @@ class Multiple extends react.Component{
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
+ // </div>,domNode)
|
|
|
}
|
|
|
|
|
|
}
|