<!-- NumericInput.vue -->
<script setup>
const model = defineModel() // bindet v-model automatisch
</script>

<template>
  <input
      type="text"
      :value="model"
      @input="model = $event.target.value.replace(/[^0-9]/g, '')"
      @keypress="($event) => {
    if (!/[0-9]/.test($event.key)) {
      $event.preventDefault()
    }
  }"
  />
</template>
