Use form layout
parent
766e423b07
commit
a85903aefd
|
@ -8,41 +8,35 @@
|
|||
</div>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<h3 class="first">Basic</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="binary" v-model="checked" :binary="true" />
|
||||
<label for="binary" style="font-weight: bold">{{checked}}</label>
|
||||
</div>
|
||||
<h3>Basic</h3>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="binary" v-model="checked" :binary="true" />
|
||||
<label for="binary">{{checked}}</label>
|
||||
</div>
|
||||
|
||||
<h3>Multiple</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city1" name="city" value="Chicago" v-model="cities" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city2" name="city" value="Los Angeles" v-model="cities" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city3" name="city" value="New York" v-model="cities" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city4" name="city" value="San Francisco" v-model="cities" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city1" name="city" value="Chicago" v-model="cities" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city2" name="city" value="Los Angeles" v-model="cities" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city3" name="city" value="New York" v-model="cities" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city4" name="city" value="San Francisco" v-model="cities" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<p>Selected Cities : <span style="font-weight: bold">{{cities}}</span></p>
|
||||
|
||||
<h3>Dynamic Values, Preselection, Value Binding and Disabled Option</h3>
|
||||
<div class="p-grid">
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-col-12">
|
||||
<Checkbox :id="theme.key" name="theme" :value="theme" v-model="selectedThemes" :disabled="theme.key === 'U'"/>
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-field-checkbox">
|
||||
<Checkbox :id="theme.key" name="theme" :value="theme" v-model="selectedThemes" :disabled="theme.key === 'U'"/>
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<p>Selected Themes: <span style="font-weight: bold">{{this.selectedThemes}}</span></p>
|
||||
</div>
|
||||
|
@ -71,14 +65,3 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.p-col-12 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
</style>
|
|
@ -146,40 +146,34 @@ export default {
|
|||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<h3>Basic</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="binary" v-model="checked" :binary="true"/>
|
||||
<label for="binary" class="p-checkbox-label" style="font-weight: bold">{{checked}}</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="binary" v-model="checked" :binary="true" />
|
||||
<label for="binary">{{checked}}</label>
|
||||
</div>
|
||||
|
||||
<h3>Multiple</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city1" name="city" value="Chicago" v-model="cities" />
|
||||
<label for="city1" class="p-checkbox-label">Chicago</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city2" name="city" value="Los Angeles" v-model="cities" />
|
||||
<label for="city2" class="p-checkbox-label">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city3" name="city" value="New York" v-model="cities" />
|
||||
<label for="city3" class="p-checkbox-label">New York</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<Checkbox id="city4" name="city" value="San Francisco" v-model="cities" />
|
||||
<label for="city4" class="p-checkbox-label">San Francisco</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city1" name="city" value="Chicago" v-model="cities" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city2" name="city" value="Los Angeles" v-model="cities" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city3" name="city" value="New York" v-model="cities" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<Checkbox id="city4" name="city" value="San Francisco" v-model="cities" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<p>Selected Cities : <span style="font-weight: bold">{{cities}}</span></p>
|
||||
|
||||
<h3>Dynamic Values, Preselection, Value Binding and Disabled Option</h3>
|
||||
<div class="p-grid">
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-col-12">
|
||||
<Checkbox :id="theme.key" name="theme" :value="theme" v-model="selectedThemes" :disabled="theme.key === 'U'"/>
|
||||
<label :for="theme.key" class="p-checkbox-label">{{theme.name}}</label>
|
||||
</div>
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-field-checkbox">
|
||||
<Checkbox :id="theme.key" name="theme" :value="theme" v-model="selectedThemes" :disabled="theme.key === 'U'"/>
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<p>Selected Themes: <span style="font-weight: bold">{{this.selectedThemes}}</span></p>
|
||||
</template>
|
||||
|
|
|
@ -9,101 +9,101 @@
|
|||
|
||||
<div class="content-section implementation">
|
||||
<h3>Numerals</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Integer Only
|
||||
<InputNumber v-model="value1" />
|
||||
<div class="p-fluid p-grid p-formgrid">
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="integeronly">Integer Only</label>
|
||||
<InputNumber id="integeronly" v-model="value1" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Without Grouping
|
||||
<InputNumber v-model="value2" mode="decimal" :useGrouping="false" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="withoutgrouping">Without Grouping</label>
|
||||
<InputNumber id="withoutgrouping" v-model="value2" mode="decimal" :useGrouping="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Fraction Digits
|
||||
<InputNumber v-model="value3" mode="decimal" :minFractionDigits="2" :maxFractionDigits="5" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="integeronly">Min-Max Fraction Digits</label>
|
||||
<InputNumber id="integeronly" v-model="value3" mode="decimal" :minFractionDigits="2" :maxFractionDigits="5" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Boundaries
|
||||
<InputNumber v-model="value4" mode="decimal" :min="0" :max="100" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="minmax">Min-Max Boundaries</label>
|
||||
<InputNumber id="minmax" v-model="value4" mode="decimal" :min="0" :max="100" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-3">
|
||||
User Locale
|
||||
<InputNumber v-model="value5" mode="decimal" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-user">User Locale</label>
|
||||
<InputNumber id="locale-user" v-model="value5" mode="decimal" :minFractionDigits="2" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
United State Locale
|
||||
<InputNumber v-model="value6" mode="decimal" locale="en-US" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-us">United States Locale</label>
|
||||
<InputNumber id="locale-us" v-model="value6" mode="decimal" locale="en-US" :minFractionDigits="2" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
German Locale
|
||||
<InputNumber v-model="value7" mode="decimal" locale="de-DE" :minFractionDigits="2"/>
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-german">German Locale</label>
|
||||
<InputNumber id="locale-german" v-model="value7" mode="decimal" locale="de-DE" :minFractionDigits="2"/>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Indian Locale
|
||||
<InputNumber v-model="value8" mode="decimal" locale="en-IN" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-japan">Indian Locale</label>
|
||||
<InputNumber id="locale-japan" v-model="value8" mode="decimal" locale="en-IN" :minFractionDigits="2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Currency</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
United States
|
||||
<InputNumber v-model="value9" mode="currency" currency="USD" locale="en-US" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-us">United States</label>
|
||||
<InputNumber id="currency-us" v-model="value9" mode="currency" currency="USD" locale="en-US" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Germany
|
||||
<InputNumber v-model="value10" mode="currency" currency="EUR" locale="de-DE" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-germany">Germany</label>
|
||||
<InputNumber id="currency-germany" v-model="value10" mode="currency" currency="EUR" locale="de-DE" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
India
|
||||
<InputNumber v-model="value11" mode="currency" currency="INR" currencyDisplay="code" locale="en-IN" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-india">India</label>
|
||||
<InputNumber id="currency-india" v-model="value11" mode="currency" currency="INR" currencyDisplay="code" locale="en-IN" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Japan
|
||||
<InputNumber v-model="value12" mode="currency" currency="JPY" locale="jp-JP" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-japan">Japan</label>
|
||||
<InputNumber id="currency-japan" v-model="value12" mode="currency" currency="JPY" locale="jp-JP" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Prefix and Suffix</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Mile
|
||||
<InputNumber v-model="value13" suffix=" mi" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="mile">Mile</label>
|
||||
<InputNumber id="mile" v-model="value13" suffix=" mi" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Percent
|
||||
<InputNumber v-model="value14" prefix="%" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="percent">Percent</label>
|
||||
<InputNumber id="percent" v-model="value14" prefix="%" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Expiry
|
||||
<InputNumber v-model="value15" prefix="Expires in " suffix=" days" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="expiry">Expiry</label>
|
||||
<InputNumber id="expiry" v-model="value15" prefix="Expires in " suffix=" days" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Temperature
|
||||
<InputNumber v-model="value16" prefix="↑ " suffix="℃" :min="0" :max="40" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="temperature">Temperature</label>
|
||||
<InputNumber id="temperature" v-model="value16" prefix="↑ " suffix="℃" :min="0" :max="40" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Buttons</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Stacked
|
||||
<InputNumber v-model="value17" showButtons mode="currency" currency="USD" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="stacked">Stacked</label>
|
||||
<InputNumber id="stacked" v-model="value17" showButtons mode="currency" currency="USD" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Horizontal with Step
|
||||
<InputNumber v-model="value18" showButtons buttonLayout="horizontal" spinnerMode="horizontal" :step="0.25"
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="horizontal">Horizontal with Step</label>
|
||||
<InputNumber id="horizontal" v-model="value18" showButtons buttonLayout="horizontal" spinnerMode="horizontal" :step="0.25"
|
||||
decrementButtonClass="p-button-danger" incrementButtonClass="p-button-success" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" mode="currency" currency="EUR" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
<div>Vertical</div>
|
||||
<InputNumber v-model="value19" mode="decimal" showButtons buttonLayout="vertical" spinnerMode="vertical"
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="vertical">Vertical</label>
|
||||
<InputNumber id="vertical" v-model="value19" mode="decimal" showButtons buttonLayout="vertical" spinnerMode="vertical"
|
||||
decrementButtonClass="p-button-secondary" incrementButtonClass="p-button-secondary" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Boundaries
|
||||
<InputNumber v-model="value20" mode="decimal" showButtons :min="0" :max="100" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="minmax-buttons">Min-Max Boundaries</label>
|
||||
<InputNumber id="minmax-buttons" v-model="value20" mode="decimal" showButtons :min="0" :max="100" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -147,7 +147,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.p-inputnumber {
|
||||
margin-top: 1rem;
|
||||
.layout-content .content-section.implementation > h3 {
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
|
@ -321,101 +321,101 @@ Vertical
|
|||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<h3>Numerals</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Integer Only
|
||||
<InputNumber v-model="value1" />
|
||||
<div class="p-fluid p-grid p-formgrid">
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="integeronly">Integer Only</label>
|
||||
<InputNumber id="integeronly" v-model="value1" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Without Grouping
|
||||
<InputNumber v-model="value2" mode="decimal" :useGrouping="false" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="withoutgrouping">Without Grouping</label>
|
||||
<InputNumber id="withoutgrouping" v-model="value2" mode="decimal" :useGrouping="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Fraction Digits
|
||||
<InputNumber v-model="value3" mode="decimal" :minFractionDigits="2" :maxFractionDigits="5" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="integeronly">Min-Max Fraction Digits</label>
|
||||
<InputNumber id="integeronly" v-model="value3" mode="decimal" :minFractionDigits="2" :maxFractionDigits="5" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Boundaries
|
||||
<InputNumber v-model="value4" mode="decimal" :min="0" :max="100" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="minmax">Min-Max Boundaries</label>
|
||||
<InputNumber id="minmax" v-model="value4" mode="decimal" :min="0" :max="100" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-3">
|
||||
User Locale
|
||||
<InputNumber v-model="value5" mode="decimal" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-user">User Locale</label>
|
||||
<InputNumber id="locale-user" v-model="value5" mode="decimal" :minFractionDigits="2" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
United State Locale
|
||||
<InputNumber v-model="value6" mode="decimal" locale="en-US" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-us">United States Locale</label>
|
||||
<InputNumber id="locale-us" v-model="value6" mode="decimal" locale="en-US" :minFractionDigits="2" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
German Locale
|
||||
<InputNumber v-model="value7" mode="decimal" locale="de-DE" :minFractionDigits="2"/>
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-german">German Locale</label>
|
||||
<InputNumber id="locale-german" v-model="value7" mode="decimal" locale="de-DE" :minFractionDigits="2"/>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Indian Locale
|
||||
<InputNumber v-model="value8" mode="decimal" locale="en-IN" :minFractionDigits="2" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="locale-japan">Indian Locale</label>
|
||||
<InputNumber id="locale-japan" v-model="value8" mode="decimal" locale="en-IN" :minFractionDigits="2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Currency</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
United States
|
||||
<InputNumber v-model="value9" mode="currency" currency="USD" locale="en-US" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-us">United States</label>
|
||||
<InputNumber id="currency-us" v-model="value9" mode="currency" currency="USD" locale="en-US" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Germany
|
||||
<InputNumber v-model="value10" mode="currency" currency="EUR" locale="de-DE" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-germany">Germany</label>
|
||||
<InputNumber id="currency-germany" v-model="value10" mode="currency" currency="EUR" locale="de-DE" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
India
|
||||
<InputNumber v-model="value11" mode="currency" currency="INR" currencyDisplay="code" locale="en-IN" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-india">India</label>
|
||||
<InputNumber id="currency-india" v-model="value11" mode="currency" currency="INR" currencyDisplay="code" locale="en-IN" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Japan
|
||||
<InputNumber v-model="value12" mode="currency" currency="JPY" locale="jp-JP" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="currency-japan">Japan</label>
|
||||
<InputNumber id="currency-japan" v-model="value12" mode="currency" currency="JPY" locale="jp-JP" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Prefix and Suffix</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Mile
|
||||
<InputNumber v-model="value13" suffix=" mi" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="mile">Mile</label>
|
||||
<InputNumber id="mile" v-model="value13" suffix=" mi" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Percent
|
||||
<InputNumber v-model="value14" prefix="%" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="percent">Percent</label>
|
||||
<InputNumber id="percent" v-model="value14" prefix="%" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Expiry
|
||||
<InputNumber v-model="value15" prefix="Expires in " suffix=" days" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="expiry">Expiry</label>
|
||||
<InputNumber id="expiry" v-model="value15" prefix="Expires in " suffix=" days" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Temperature
|
||||
<InputNumber v-model="value16" prefix="↑ " suffix="℃" :min="0" :max="40" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="temperature">Temperature</label>
|
||||
<InputNumber id="temperature" v-model="value16" prefix="↑ " suffix="℃" :min="0" :max="40" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Buttons</h3>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-3">
|
||||
Stacked
|
||||
<InputNumber v-model="value17" showButtons mode="currency" currency="USD" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="stacked">Stacked</label>
|
||||
<InputNumber id="stacked" v-model="value17" showButtons mode="currency" currency="USD" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Horizontal with Step
|
||||
<InputNumber v-model="value18" showButtons buttonLayout="horizontal" spinnerMode="horizontal" :step="0.25"
|
||||
decrementButtonclass="p-button-danger" incrementButtonclass="p-button-success" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" mode="currency" currency="EUR" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="horizontal">Horizontal with Step</label>
|
||||
<InputNumber id="horizontal" v-model="value18" showButtons buttonLayout="horizontal" spinnerMode="horizontal" :step="0.25"
|
||||
decrementButtonClass="p-button-danger" incrementButtonClass="p-button-success" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" mode="currency" currency="EUR" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
<div>Vertical</div>
|
||||
<InputNumber v-model="value19" mode="decimal" showButtons buttonLayout="vertical" spinnerMode="vertical"
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="vertical">Vertical</label>
|
||||
<InputNumber id="vertical" v-model="value19" mode="decimal" showButtons buttonLayout="vertical" spinnerMode="vertical"
|
||||
decrementButtonClass="p-button-secondary" incrementButtonClass="p-button-secondary" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-3">
|
||||
Min-Max Boundaries
|
||||
<InputNumber v-model="value20" mode="decimal" showButtons :min="0" :max="100" />
|
||||
<div class="p-field p-col-12 p-md-3">
|
||||
<label for="minmax-buttons">Min-Max Boundaries</label>
|
||||
<InputNumber id="minmax-buttons" v-model="value20" mode="decimal" showButtons :min="0" :max="100" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -8,33 +8,29 @@
|
|||
</div>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<h3 class="first">Basic</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city1" name="city" value="Chicago" v-model="city" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city2" name="city" value="Los Angeles" v-model="city" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city3" name="city" value="New York" v-model="city" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city4" name="city" value="San Francisco" v-model="city" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<h3>Basic</h3>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city1" name="city" value="Chicago" v-model="city" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city2" name="city" value="Los Angeles" v-model="city" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city3" name="city" value="New York" v-model="city" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city4" name="city" value="San Francisco" v-model="city" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<p>Selected City: <span style="font-weight: bold">{{this.city}}</span></p>
|
||||
|
||||
<h3>Dynamic Values, Preselection, Value Binding and Disabled Option</h3>
|
||||
<div class="p-grid">
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-col-12">
|
||||
<RadioButton :id="theme.key" name="theme" :value="theme" v-model="selectedTheme" :disabled="theme.key === 'U'" />
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-field-radiobutton">
|
||||
<RadioButton :id="theme.key" name="theme" :value="theme" v-model="selectedTheme" :disabled="theme.key === 'U'" />
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<p>Selected Theme: <span style="font-weight: bold">{{this.selectedTheme}}</span></p>
|
||||
</div>
|
||||
|
@ -62,14 +58,3 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.p-col-12 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
</style>
|
|
@ -138,32 +138,28 @@ export default {
|
|||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<h3>Basic</h3>
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city1" name="city" value="Chicago" v-model="city" />
|
||||
<label for="city1" class="p-radiobutton-label">Chicago</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city2" name="city" value="Los Angeles" v-model="city" />
|
||||
<label for="city2" class="p-radiobutton-label">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city3" name="city" value="New York" v-model="city" />
|
||||
<label for="city3" class="p-radiobutton-label">New York</label>
|
||||
</div>
|
||||
<div class="p-col-12">
|
||||
<RadioButton id="city4" name="city" value="San Francisco" v-model="city" />
|
||||
<label for="city4" class="p-radiobutton-label">San Francisco</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city1" name="city" value="Chicago" v-model="city" />
|
||||
<label for="city1">Chicago</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city2" name="city" value="Los Angeles" v-model="city" />
|
||||
<label for="city2">Los Angeles</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city3" name="city" value="New York" v-model="city" />
|
||||
<label for="city3">New York</label>
|
||||
</div>
|
||||
<div class="p-field-radiobutton">
|
||||
<RadioButton id="city4" name="city" value="San Francisco" v-model="city" />
|
||||
<label for="city4">San Francisco</label>
|
||||
</div>
|
||||
<p>Selected City: <span style="font-weight: bold">{{this.city}}</span></p>
|
||||
|
||||
<h3>Dynamic Values, Preselection, Value Binding and Disabled Option</h3>
|
||||
<div class="p-grid">
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-col-12">
|
||||
<RadioButton :id="theme.key" name="theme" :value="theme" v-model="selectedTheme" :disabled="theme.key === 'U'" />
|
||||
<label :for="theme.key" class="p-radiobutton-label">{{theme.name}}</label>
|
||||
</div>
|
||||
<div v-for="theme of themes" :key="theme.key" class="p-field-radiobutton">
|
||||
<RadioButton :id="theme.key" name="theme" :value="theme" v-model="selectedTheme" :disabled="theme.key === 'U'" />
|
||||
<label :for="theme.key">{{theme.name}}</label>
|
||||
</div>
|
||||
<p>Selected Theme: <span style="font-weight: bold">{{this.selectedTheme}}</span></p>
|
||||
</template>
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="content-section implementation">
|
||||
<h3 class="first">Basic</h3>
|
||||
<ToggleButton v-model="checked1" onIcon="pi pi-check" offIcon="pi pi-times" />
|
||||
<p style="font-weight: bold">{{checked1}}</p>
|
||||
<p>{{checked1}}</p>
|
||||
|
||||
<h3>Customized</h3>
|
||||
<ToggleButton v-model="checked2" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" style="width: 10em" />
|
||||
<p style="font-weight: bold">{{checked2}}</p>
|
||||
<p>{{checked2}}</p>
|
||||
</div>
|
||||
|
||||
<ToggleButtonDoc/>
|
||||
|
|
|
@ -168,11 +168,11 @@ export default {
|
|||
<template v-pre>
|
||||
<h3>Basic</h3>
|
||||
<ToggleButton v-model="checked1" onIcon="pi pi-check" offIcon="pi pi-times" />
|
||||
<p style="font-weight: bold">{{checked1}}</p>
|
||||
<p>{{checked1}}</p>
|
||||
|
||||
<h3>Customized</h3>
|
||||
<ToggleButton v-model="checked2" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" style="width: 10em" />
|
||||
<p style="font-weight: bold">{{checked2}}</p>
|
||||
<p>{{checked2}}</p>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
|
|
|
@ -8,13 +8,10 @@
|
|||
</div>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<div class="p-grid">
|
||||
<div class="p-col-12">
|
||||
<TriStateCheckbox v-model="value" />
|
||||
<label>{{value == null ? 'null' : value}}</label>
|
||||
</div>
|
||||
<div class="p-field-checkbox">
|
||||
<TriStateCheckbox v-model="value" />
|
||||
<label>{{value == null ? 'null' : value}}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<TriStateCheckboxDoc/>
|
||||
|
@ -35,15 +32,3 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.p-col-12 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: bold;
|
||||
margin-left: .5rem;
|
||||
}
|
||||
</style>
|
|
@ -123,8 +123,10 @@ import TriStateCheckbox from 'primevue/tristatecheckbox';
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<TriStateCheckbox v-model="value" />
|
||||
<span >{{value == null ? 'null' : value}}</span>
|
||||
<div class="p-field-checkbox">
|
||||
<TriStateCheckbox v-model="value" />
|
||||
<label>{{value == null ? 'null' : value}}</label>
|
||||
</div>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
|
|
Loading…
Reference in New Issue