|
@@ -198,15 +198,16 @@ class NumberDrop extends Component{
|
|
|
handleHide&&handleHide();
|
|
|
}
|
|
|
getClasses(nospecial){ //整个标签是否有值的状态
|
|
|
- const {hideTag,placeholder,isImports,isExtBlue} = this.props;
|
|
|
+ const {hideTag,placeholder,isImports,isExtBlue,isSelectAll} = this.props;
|
|
|
const val = this.state.value;
|
|
|
const isSelected = val&&val!=placeholder?style['selected']:style['container'];
|
|
|
const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
|
|
|
const ext = isExtBlue?style['ext']:'';
|
|
|
const noTag = hideTag?style['no-tag']:'';
|
|
|
- return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:val?2:1));
|
|
|
+ return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:val?2:isSelectAll?2:1));
|
|
|
}
|
|
|
getSpanClass(nospecial){ //将被替换的文字选中状态显示
|
|
|
+ const {isSelectAll} = this.props;
|
|
|
const cls = this.props.show?style['blued']:style['nol'];
|
|
|
return cls+' '+setFontColorSize(nospecial?'':2);
|
|
|
}
|
|
@@ -244,13 +245,13 @@ class NumberDrop extends Component{
|
|
|
});
|
|
|
}
|
|
|
render(){
|
|
|
- const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial} = this.props;
|
|
|
+ const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial,isSelectAll,isExtBlue} = this.props;
|
|
|
const val = formulaCode==="BMI_RES"?(+bmi===Infinity||isNaN(bmi)?'':bmi):value;
|
|
|
const {placeholder,hasSelect} = this.state;
|
|
|
return <div className={this.getClasses(nospecial)}
|
|
|
style={{position:'relative'}}
|
|
|
onClick={allClick?this.handleNumClick:null}>
|
|
|
- <span className="prefixUnset">{prefix}</span>
|
|
|
+ <span className={`${setFontColorSize(isSelectAll?2:isExtBlue?2:1)}`}>{prefix}</span>
|
|
|
<span onFocus={this.handleNumFocus}
|
|
|
onClick={allClick?null:this.handleNumClick}
|
|
|
contentEditable={true}
|
|
@@ -261,7 +262,7 @@ class NumberDrop extends Component{
|
|
|
onInput={this.handleSpanInp}
|
|
|
className={this.getSpanClass(nospecial)}
|
|
|
> {val||placeholder}</span>
|
|
|
- <span className="prefixUnset">{suffix}</span>
|
|
|
+ <span className={`${setFontColorSize(isSelectAll?2:isExtBlue?2:1)}`}>{suffix}</span>
|
|
|
<NumberPan handleSelect={this.select.bind(this)}
|
|
|
noString={formulaCode?true:false}
|
|
|
onClose={handleHide}
|