fix: min and max values of PriceCards
min default of 1, max default of undefined for infinite
This commit is contained in:
parent
72aaf5174d
commit
878b7e06e8
2 changed files with 8 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="Input">
|
||||
<input :type="type" :id="makeId()" placeholder=" " min="1" :max="max" />
|
||||
<input :type="type" :id="makeId()" placeholder=" " :min="min" :max="max" />
|
||||
<label :for="makeId()">{{ label }}</label>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -9,6 +9,7 @@
|
|||
type Props = {
|
||||
type ?: 'text' | 'number'
|
||||
max ?: number
|
||||
min ?: number
|
||||
label : string
|
||||
id : string
|
||||
uid : number
|
||||
|
@ -16,7 +17,8 @@ type Props = {
|
|||
|
||||
const {
|
||||
type = 'text',
|
||||
max = 10,
|
||||
min = 1,
|
||||
max,
|
||||
label,
|
||||
id,
|
||||
uid,
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<form class="PriceCard">
|
||||
<div class="wrapper">
|
||||
<PpFormInput label="Name" id="n" :uid="uid" type="text" />
|
||||
<PpFormInput label="Preis" id="p" :uid="uid" type="number" />
|
||||
<PpFormInput label="Preis" id="p" :uid="uid" type="number" :min="0.01" />
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<PpFormInput label="Rollen" id="r" :uid="uid" type="number" />
|
||||
<PpFormInput label="Blätter" id="b" :uid="uid" type="number" />
|
||||
<PpFormInput label="Lagen" id="l" :uid="uid" type="number" />
|
||||
<PpFormInput label="Rollen" id="r" :uid="uid" type="number" :max="150" />
|
||||
<PpFormInput label="Blätter" id="b" :uid="uid" type="number" :max="500" />
|
||||
<PpFormInput label="Lagen" id="l" :uid="uid" type="number" :max="10" />
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue