parent
6c28a8e40c
commit
7d7f0f326c
|
@ -172,9 +172,9 @@ export default defineComponent({
|
||||||
handleInputBlur,
|
handleInputBlur,
|
||||||
size,
|
size,
|
||||||
disabled,
|
disabled,
|
||||||
|
valueModifiers = {},
|
||||||
$attrs,
|
$attrs,
|
||||||
} = this;
|
} = this;
|
||||||
|
|
||||||
const inputProps: any = {
|
const inputProps: any = {
|
||||||
...otherProps,
|
...otherProps,
|
||||||
...$attrs,
|
...$attrs,
|
||||||
|
@ -190,6 +190,9 @@ export default defineComponent({
|
||||||
onFocus: handleInputFocus,
|
onFocus: handleInputFocus,
|
||||||
onBlur: handleInputBlur,
|
onBlur: handleInputBlur,
|
||||||
};
|
};
|
||||||
|
if (valueModifiers.lazy) {
|
||||||
|
delete inputProps.onInput;
|
||||||
|
}
|
||||||
if (!inputProps.autofocus) {
|
if (!inputProps.autofocus) {
|
||||||
delete inputProps.autofocus;
|
delete inputProps.autofocus;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ const TextAreaProps = {
|
||||||
showCount: PropTypes.looseBool,
|
showCount: PropTypes.looseBool,
|
||||||
onCompositionstart: PropTypes.func,
|
onCompositionstart: PropTypes.func,
|
||||||
onCompositionend: PropTypes.func,
|
onCompositionend: PropTypes.func,
|
||||||
|
valueModifiers: Object,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -127,6 +128,9 @@ export default defineComponent({
|
||||||
onChange: this.handleChange,
|
onChange: this.handleChange,
|
||||||
onKeydown: this.handleKeyDown,
|
onKeydown: this.handleKeyDown,
|
||||||
};
|
};
|
||||||
|
if (this.valueModifiers?.lazy) {
|
||||||
|
delete resizeProps.onInput;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<ResizableTextArea
|
<ResizableTextArea
|
||||||
{...resizeProps}
|
{...resizeProps}
|
||||||
|
|
|
@ -32,4 +32,5 @@ export default {
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
onInput: PropTypes.func,
|
onInput: PropTypes.func,
|
||||||
'onUpdate:value': PropTypes.func,
|
'onUpdate:value': PropTypes.func,
|
||||||
|
valueModifiers: Object,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue