feat : Ajout de la sélection des bovins étape 3 d'une réception (WIP)

This commit is contained in:
2026-02-05 10:27:04 +01:00
parent 33563addbe
commit 719937d218
11 changed files with 41 additions and 134 deletions

View File

@@ -30,6 +30,7 @@
disabled ? 'cursor-not-allowed' : 'cursor-text',
inputClass
]"
@keydown="onKeydown"
@input="onInput"
>
</div>
@@ -78,7 +79,13 @@ const onInput = (event: Event) => {
emit('update:modelValue', null)
return
}
const numeric = Number(target.value)
const numeric = Math.max(0, Number(target.value))
emit('update:modelValue', Number.isNaN(numeric) ? null : numeric)
}
const onKeydown = (event: KeyboardEvent) => {
if (event.key === '-' || event.key === 'e' || event.key === 'E') {
event.preventDefault()
}
}
</script>