propapier/app/components/Pp/FormInput.vue
webfussel 878b7e06e8 fix: min and max values of PriceCards
min default of 1, max default of undefined for infinite
2025-02-10 21:26:50 +01:00

28 lines
468 B
Vue

<template>
<div class="Input">
<input :type="type" :id="makeId()" placeholder=" " :min="min" :max="max" />
<label :for="makeId()">{{ label }}</label>
</div>
</template>
<script setup lang="ts">
type Props = {
type ?: 'text' | 'number'
max ?: number
min ?: number
label : string
id : string
uid : number
}
const {
type = 'text',
min = 1,
max,
label,
id,
uid,
} = defineProps<Props>()
const makeId = () => `${id}_${uid}`
</script>