|
@@ -356,7 +356,7 @@ class SpreadDrop extends Component{
|
|
|
}
|
|
|
|
|
|
render(){
|
|
|
- const {placeholder,value,show,data} = this.props;
|
|
|
+ const {placeholder,value,show,data,order} = this.props;
|
|
|
const {editable,boxLeft,boxTop} = this.state;
|
|
|
return <div className={style['container']}
|
|
|
onFocus={(e)=>e.stopPropagation()}
|
|
@@ -372,7 +372,7 @@ class SpreadDrop extends Component{
|
|
|
onInput={this.onChange}
|
|
|
onkeydown={handleEnter}
|
|
|
>{value||placeholder}</div>
|
|
|
- <ListItems data={data} left={boxLeft}
|
|
|
+ <ListItems data={data} left={boxLeft} order={order}
|
|
|
top={boxTop} show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
|
|
|
</div>
|
|
|
}
|
|
@@ -417,10 +417,11 @@ class ListItems extends Component{
|
|
|
}
|
|
|
}
|
|
|
render (){
|
|
|
- const {handleClear,handleConfirm} = this.props;
|
|
|
+ const {handleClear,handleConfirm,order} = this.props;
|
|
|
const domNode = document.getElementById('root');
|
|
|
return ReactDom.createPortal(
|
|
|
<div className={style["drop-list"]} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
|
|
|
+ <p className={style['orderTips']}>按{order?'从左到右列':'点选'}顺序成文</p>
|
|
|
{this.getLabels()}
|
|
|
<div className="oper">
|
|
|
<span className={style['clear']} onClick={handleClear}>清空选项</span>
|