refactor(hooks): [useFocusController] add disabled attribute (#21032)

refactor(hooks): [useFocusController] add disabled prop

Co-authored-by: warmthsea <2586244885@qq.com>
This commit is contained in:
qiang
2025-07-01 16:41:35 +08:00
committed by GitHub
parent c5d37fbb0a
commit b881ef25cb
10 changed files with 80 additions and 51 deletions

View File

@ -256,9 +256,7 @@ const _ref = computed(() => input.value || textarea.value)
const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(
_ref,
{
beforeFocus() {
return inputDisabled.value
},
disabled: inputDisabled,
afterBlur() {
if (props.validateEvent) {
elFormItem?.validate?.('blur').catch((err) => debugWarn(err))