fix(Field): should emit blur event when readonly (#11699)

This commit is contained in:
Jungzl 2023-03-25 09:20:12 +08:00 committed by GitHub
parent d883591b91
commit 07c0e3e9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -397,13 +397,14 @@ export default defineComponent({
};
const onBlur = (event: Event) => {
state.focused = false;
updateValue(getModelValue(), 'onBlur');
emit('blur', event);
if (getProp('readonly')) {
return;
}
state.focused = false;
updateValue(getModelValue(), 'onBlur');
emit('blur', event);
validateWithTrigger('onBlur');
nextTick(adjustTextareaSize);
resetScroll();