textFontSizeChange = (value,index) => {
const {record} = this.state;
record[index]=value||'';
this.setState({record});
let { layerData, layerUpdateConfig} = this.props;
layerData.style.fontSize = value;
layerUpdateConfig(layerData.layerId, {style:layerData.style});
}
onSearchSelect = (value, index) => {
const {newValue} = this.state;
if (!!value) {
newValue[index] = value+'px'||'';
this.setState({newValue});
}
}
onBlurSelect = (index) => {
const {newValue} = this.state;
const value = newValue[index];
if (!!value) {
this.textFontSizeChange(value,index);
// 在onBlur后将对应的key删除,防止当从下拉框中选择后再次触发onBlur时经过此处恢复成原来的值
delete newValue[index]