|
@@ -185,19 +185,19 @@ class NumberUnitDrop extends Component{
|
|
|
}
|
|
|
|
|
|
render(){
|
|
|
- const {placeholder,prefix,suffix,show,value,handleHide} = this.props;
|
|
|
- const {numEditable,editable,hasSelect,boxLeft,boxTop} = this.state;
|
|
|
+ const {placeholder,prefix,suffix,show,value,handleHide,hideTag} = this.props;
|
|
|
+ const {editable,hasSelect,boxLeft,boxTop} = this.state;
|
|
|
return <div className={this.getClasses()}
|
|
|
ref={this.$cont}
|
|
|
onClick={this.handleNumClick}
|
|
|
contentEditable={editable}
|
|
|
onBlur={this.numInpBlur}
|
|
|
- onDoubleClick={this.changeToEdit}
|
|
|
- onkeydown={handleEnter}
|
|
|
+ onDoubleClick={hideTag?null:this.changeToEdit}
|
|
|
+ onKeyDown={handleEnter}
|
|
|
onInput={this.handleSpanInp}>
|
|
|
<span ref = {this.$pre}>{prefix?prefix+' ':prefix}</span>
|
|
|
<span ref = {this.$span}
|
|
|
- onkeydown={handleEnter}
|
|
|
+ onKeyDown={handleEnter}
|
|
|
style={{cursor:editable?'text':'pointer'}}>{value||placeholder}</span>
|
|
|
<span ref = {this.$suf}>{suffix?' '+suffix:suffix}</span>
|
|
|
<NumberUnitPan handleSelect={(obj)=>this.select(obj)}
|