Invoices can be uploaded
This commit is contained in:
17
app/Views/Components/NumericInput.vue
Normal file
17
app/Views/Components/NumericInput.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<!-- 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>
|
||||
Reference in New Issue
Block a user