|
@@ -2,7 +2,7 @@ import React,{Component} from 'react';
|
|
|
import classNames from 'classnames';
|
|
|
import config from '@config/index.js';
|
|
|
import style from './index.less';
|
|
|
-import {deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
|
|
|
+import {setPosition,deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
|
|
|
import {Notify} from '@commonComp';
|
|
|
import ScrollArea from 'react-scrollbar';
|
|
|
import $ from 'jquery';
|
|
@@ -63,7 +63,7 @@ class SpreadDrop extends Component{
|
|
|
}
|
|
|
handleShow(e){//单击
|
|
|
e&&e.stopPropagation();
|
|
|
- const {ikey,handleShow,placeholder,flag,id,value,tagType,type,data,windowWidth} = this.props;
|
|
|
+ const {ikey,handleShow,placeholder,flag,id,value,tagType,type,data,windowWidth,setHighter} = this.props;
|
|
|
let num = 0;//判断为五类切超出页面
|
|
|
data && data.map((item)=>{
|
|
|
if(item.formPosition != 1){
|
|
@@ -76,6 +76,8 @@ class SpreadDrop extends Component{
|
|
|
left:windowWidth-listWidth-150
|
|
|
})
|
|
|
}
|
|
|
+ //高度超出时,增加左侧大容器padding
|
|
|
+ setPosition(e,this.$list.current,setHighter);
|
|
|
// window.event? window.event.cancelBubble = true : e.stopPropagation();
|
|
|
this.setStateInit(); //恢复初始选中状态
|
|
|
const that = this;
|
|
@@ -342,7 +344,12 @@ class SpreadDrop extends Component{
|
|
|
},this);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ /*componentWillReceiveProps(nextProps){
|
|
|
+ const {setHighter} = this.props;
|
|
|
+ if(!nextProps.show){console.log(22)
|
|
|
+ setHighter&&setHighter(48);
|
|
|
+ }
|
|
|
+ }*/
|
|
|
render(){
|
|
|
const {placeholder,value,show,data,order} = this.props;
|
|
|
const {editable,left} = this.state;
|