feat: input add focus when click clear button
parent
8820a184e2
commit
723b6c6cf6
|
@ -114,6 +114,9 @@ export default {
|
||||||
|
|
||||||
handleReset(e) {
|
handleReset(e) {
|
||||||
this.setValue('', e);
|
this.setValue('', e);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.focus();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleChange(e) {
|
handleChange(e) {
|
||||||
|
@ -123,7 +126,13 @@ export default {
|
||||||
renderClearIcon(prefixCls) {
|
renderClearIcon(prefixCls) {
|
||||||
const { allowClear, disabled } = this.$props;
|
const { allowClear, disabled } = this.$props;
|
||||||
const { stateValue } = this;
|
const { stateValue } = this;
|
||||||
if (!allowClear || disabled || stateValue === undefined || stateValue === null || stateValue === '') {
|
if (
|
||||||
|
!allowClear ||
|
||||||
|
disabled ||
|
||||||
|
stateValue === undefined ||
|
||||||
|
stateValue === null ||
|
||||||
|
stateValue === ''
|
||||||
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue