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>
|
<template>
|
||||||
<div class="Input">
|
<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>
|
<label :for="makeId()">{{ label }}</label>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
type Props = {
|
type Props = {
|
||||||
type ?: 'text' | 'number'
|
type ?: 'text' | 'number'
|
||||||
max ?: number
|
max ?: number
|
||||||
|
min ?: number
|
||||||
label : string
|
label : string
|
||||||
id : string
|
id : string
|
||||||
uid : number
|
uid : number
|
||||||
|
@ -16,7 +17,8 @@ type Props = {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
type = 'text',
|
type = 'text',
|
||||||
max = 10,
|
min = 1,
|
||||||
|
max,
|
||||||
label,
|
label,
|
||||||
id,
|
id,
|
||||||
uid,
|
uid,
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<form class="PriceCard">
|
<form class="PriceCard">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<PpFormInput label="Name" id="n" :uid="uid" type="text" />
|
<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>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<PpFormInput label="Rollen" id="r" :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" />
|
<PpFormInput label="Blätter" id="b" :uid="uid" type="number" :max="500" />
|
||||||
<PpFormInput label="Lagen" id="l" :uid="uid" type="number" />
|
<PpFormInput label="Lagen" id="l" :uid="uid" type="number" :max="10" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue