parent
a678e3b550
commit
c897d32a00
|
@ -28,7 +28,6 @@ const Header = {
|
||||||
currentSelectPanel: PropTypes.string,
|
currentSelectPanel: PropTypes.string,
|
||||||
focusOnOpen: PropTypes.bool,
|
focusOnOpen: PropTypes.bool,
|
||||||
// onKeyDown: PropTypes.func,
|
// onKeyDown: PropTypes.func,
|
||||||
showStr: PropTypes.bool.def(true),
|
|
||||||
clearIcon: PropTypes.any,
|
clearIcon: PropTypes.any,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -70,7 +69,6 @@ const Header = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showStr = true;
|
|
||||||
this.setState({
|
this.setState({
|
||||||
str,
|
str,
|
||||||
});
|
});
|
||||||
|
@ -192,14 +190,14 @@ const Header = {
|
||||||
},
|
},
|
||||||
|
|
||||||
getInput() {
|
getInput() {
|
||||||
const { prefixCls, placeholder, inputReadOnly, invalid, str, showStr } = this;
|
const { prefixCls, placeholder, inputReadOnly, invalid, str } = this;
|
||||||
const invalidClass = invalid ? `${prefixCls}-input-invalid` : '';
|
const invalidClass = invalid ? `${prefixCls}-input-invalid` : '';
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
class={`${prefixCls}-input ${invalidClass}`}
|
class={`${prefixCls}-input ${invalidClass}`}
|
||||||
ref="input"
|
ref="input"
|
||||||
onKeydown={this.onKeyDown}
|
onKeydown={this.onKeyDown}
|
||||||
value={showStr ? str : ''}
|
value={str}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
onInput={this.onInputChange}
|
onInput={this.onInputChange}
|
||||||
readOnly={!!inputReadOnly}
|
readOnly={!!inputReadOnly}
|
||||||
|
|
|
@ -57,7 +57,6 @@ const Panel = {
|
||||||
sValue: this.value,
|
sValue: this.value,
|
||||||
selectionRange: [],
|
selectionRange: [],
|
||||||
currentSelectPanel: '',
|
currentSelectPanel: '',
|
||||||
showStr: true,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -65,11 +64,6 @@ const Panel = {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.setState({
|
this.setState({
|
||||||
sValue: val,
|
sValue: val,
|
||||||
showStr: true,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
showStr: false,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -132,7 +126,6 @@ const Panel = {
|
||||||
inputReadOnly,
|
inputReadOnly,
|
||||||
sValue,
|
sValue,
|
||||||
currentSelectPanel,
|
currentSelectPanel,
|
||||||
showStr,
|
|
||||||
$listeners = {},
|
$listeners = {},
|
||||||
} = this;
|
} = this;
|
||||||
const clearIcon = getComponentFromProp(this, 'clearIcon');
|
const clearIcon = getComponentFromProp(this, 'clearIcon');
|
||||||
|
@ -181,7 +174,6 @@ const Panel = {
|
||||||
focusOnOpen={focusOnOpen}
|
focusOnOpen={focusOnOpen}
|
||||||
onKeydown={keydown}
|
onKeydown={keydown}
|
||||||
inputReadOnly={inputReadOnly}
|
inputReadOnly={inputReadOnly}
|
||||||
showStr={showStr}
|
|
||||||
clearIcon={clearIcon}
|
clearIcon={clearIcon}
|
||||||
/>
|
/>
|
||||||
<Combobox
|
<Combobox
|
||||||
|
|
Loading…
Reference in New Issue