|
@@ -33,9 +33,9 @@ class ItemBox extends Component {
|
|
|
handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
|
|
|
}
|
|
|
handleInput(e){
|
|
|
- const {onchange,data} = this.props;
|
|
|
+ const {handleChange,data} = this.props;
|
|
|
if(!data || (data.length==0)){//避免结构化下触发onchange,导致下拉要点两下
|
|
|
- onchange&&onchange(e)
|
|
|
+ handleChange&&handleChange(e)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -58,7 +58,7 @@ componentWillReceiveProps(nextP){
|
|
|
}
|
|
|
}
|
|
|
render(){
|
|
|
- const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
|
|
|
+ const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
|
|
|
return <div className={style["box"]+" "+"clearfix"} >
|
|
|
<div className={style["title"] + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
|
|
|
<div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
|