fix(components): [input] remove useless contants (#15351)

* fix(components): [input] remove useless contants

* fix: remove useless contants
This commit is contained in:
afe1 2024-01-04 20:52:17 +08:00 committed by GitHub
parent c6aacf99b2
commit 49ca14fecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,8 +41,8 @@
:aria-label="label"
:placeholder="placeholder"
:style="inputStyle"
:form="props.form"
:autofocus="props.autofocus"
:form="form"
:autofocus="autofocus"
@compositionstart="handleCompositionStart"
@compositionupdate="handleCompositionUpdate"
@compositionend="handleCompositionEnd"
@ -118,8 +118,8 @@
:style="textareaStyle"
:aria-label="label"
:placeholder="placeholder"
:form="props.form"
:autofocus="props.autofocus"
:form="form"
:autofocus="autofocus"
@compositionstart="handleCompositionStart"
@compositionupdate="handleCompositionUpdate"
@compositionend="handleCompositionEnd"
@ -235,9 +235,9 @@ const attrs = useAttrs({
return Object.keys(containerAttrs.value)
}),
})
const { form, formItem } = useFormItem()
const { form: elForm, formItem: elFormItem } = useFormItem()
const { inputId } = useFormItemInputId(props, {
formItemContext: formItem,
formItemContext: elFormItem,
})
const inputSize = useFormSize()
const inputDisabled = useFormDisabled()
@ -260,14 +260,14 @@ const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(
{
afterBlur() {
if (props.validateEvent) {
formItem?.validate?.('blur').catch((err) => debugWarn(err))
elFormItem?.validate?.('blur').catch((err) => debugWarn(err))
}
},
}
)
const needStatusIcon = computed(() => form?.statusIcon ?? false)
const validateState = computed(() => formItem?.validateState || '')
const needStatusIcon = computed(() => elForm?.statusIcon ?? false)
const validateState = computed(() => elFormItem?.validateState || '')
const validateIcon = computed(
() => validateState.value && ValidateComponentsMap[validateState.value]
)
@ -490,7 +490,7 @@ watch(
() => {
nextTick(() => resizeTextarea())
if (props.validateEvent) {
formItem?.validate?.('change').catch((err) => debugWarn(err))
elFormItem?.validate?.('change').catch((err) => debugWarn(err))
}
}
)