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