Skip to content

Commit 457b7a9

Browse files
fix(forms): precise type assertion for onInput event handler (#293)
Co-authored-by: Benjamin Canac <[email protected]>
1 parent 4023fbe commit 457b7a9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/runtime/components/forms/Input.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export default defineComponent({
156156
}
157157
158158
const onInput = (event: InputEvent) => {
159-
emit('update:modelValue', (event.target as any).value)
159+
emit('update:modelValue', (event.target as HTMLInputElement).value)
160160
}
161161
162162
onMounted(() => {

src/runtime/components/forms/Select.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default defineComponent({
173173
const ui = computed<Partial<typeof appConfig.ui.select>>(() => defu({}, props.ui, appConfig.ui.select))
174174
175175
const onInput = (event: InputEvent) => {
176-
emit('update:modelValue', (event.target as any).value)
176+
emit('update:modelValue', (event.target as HTMLInputElement).value)
177177
}
178178
179179
const guessOptionValue = (option: any) => {

src/runtime/components/forms/Textarea.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default defineComponent({
143143
const onInput = (event: InputEvent) => {
144144
autoResize()
145145
146-
emit('update:modelValue', (event.target as any).value)
146+
emit('update:modelValue', (event.target as HTMLInputElement).value)
147147
}
148148
149149
watch(() => props.modelValue, () => {

0 commit comments

Comments
 (0)