fix(forms)!: normalize input emits (#1560)

This commit is contained in:
Romain Hamel
2024-03-25 15:36:36 +01:00
committed by GitHub
parent 7d6b5c358f
commit 92e736213b
9 changed files with 26 additions and 16 deletions

View File

@@ -163,7 +163,7 @@ export default defineComponent({
default: () => ({})
}
},
emits: ['update:modelValue', 'blur'],
emits: ['update:modelValue', 'blur', 'change'],
setup (props, { emit, slots }) {
const { ui, attrs } = useUI('input', toRef(props, 'ui'), config, toRef(props, 'class'))
@@ -206,6 +206,7 @@ export default defineComponent({
const onChange = (event: Event) => {
const value = (event.target as HTMLInputElement).value
emit('change', value)
if (modelModifiers.value.lazy) {
updateInput(value)