diff --git a/src/views/autocomplete/AutoCompleteDoc.vue b/src/views/autocomplete/AutoCompleteDoc.vue
index c0398976d..b6ad9df6e 100755
--- a/src/views/autocomplete/AutoCompleteDoc.vue
+++ b/src/views/autocomplete/AutoCompleteDoc.vue
@@ -1,16 +1,14 @@
- AutoComplete uses v-model for two-way binding, requires a list of suggestions and a complete method to query for the results. The complete method
- gets the query text as event.query property and should update the suggestions with the search results. Example below connects to a remote datasource to fetch the results; AutoComplete uses v-model for two-way binding, requires a list of suggestions and a complete method to query for the results. The complete method
+ gets the query text as event.query property and should update the suggestions with the search results. Example below connects to a remote datasource to fetch the results; Enabling dropdown property displays a button next to the input field where click behavior of the button is defined using
- dropdownMode property that takes "blank" or "current" as possible values.
- "blank" is the default mode to send a query with an empty string whereas
- "current" setting sends a query with the current value of the input. Enabling dropdown property displays a button next to the input field where click behavior of the button is defined using
+ dropdownMode property that takes "blank" or "current" as possible values.
+ "blank" is the default mode to send a query with an empty string whereas
+ "current" setting sends a query with the current value of the input. Multiple mode is enabled using multiple property to select more than one value from the autocomplete. In this case, value reference should be an array. Multiple mode is enabled using multiple property to select more than one value from the autocomplete. In this case, value reference should be an array. AutoComplete can also work with objects using the field property that defines the label to display
- as a suggestion. The value passed to the model would still be the object instance of a suggestion.
- Here is an example with a Country object that has name and code fields such as {name:"United States",code:"USA"}. AutoComplete can also work with objects using the field property that defines the label to display
+ as a suggestion. The value passed to the model would still be the object instance of a suggestion.
+ Here is an example with a Country object that has name and code fields such as {name:"United States",code:"USA"}. Options groups are specified with the optionGroupLabel and optionGroupChildren properties. Options groups are specified with the optionGroupLabel and optionGroupChildren properties. ForceSelection mode validates the manual input to check whether it also exists in the suggestions list, if not the input value is cleared
- to make sure the value passed to the model is always one of the suggestions. Simply enable forceSelection to enforce that input is always from the suggestion list. ForceSelection mode validates the manual input to check whether it also exists in the suggestions list, if not the input value is cleared
+ to make sure the value passed to the model is always one of the suggestions. Simply enable forceSelection to enforce that input is always from the suggestion list. Item template allows displaying custom content inside the suggestions panel. The slotProps variable passed to the template provides an item property to represent an item in the suggestions collection.
- In addition optiongroup, header and footer slots are provided for further customization Item template allows displaying custom content inside the suggestions panel. The slotProps variable passed to the template provides an item property to represent an item in the suggestions collection.
+ In addition optiongroup, header and footer slots are provided for further customization Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Following is the list of structural style classes Following is the list of structural style classes None. None. Button is created using the Button element. Button is created using the Button element. Text of the button is defined using the label property. Text of the button is defined using the label property. Icon on a button is specified with icon property and position is configured using iconPos attribute. Default
- icon position is "left" and alternative is "right". To display only an icon, leave the label as undefined. Icon on a button is specified with icon property and position is configured using iconPos attribute. Default
+ icon position is "left" and alternative is "right". To display only an icon, leave the label as undefined. Events are defined with the standard notation. Events are defined with the standard notation. Different options are available as severity levels. Different options are available as severity levels. Text buttons have transparent background and borders, use p-button-text to apply text button styling. In addition when used with .p-button-plain
- text buttons ignore severity levels and displayed as a regular text. Text buttons have transparent background and borders, use p-button-text to apply text button styling. In addition when used with .p-button-plain
+ text buttons ignore severity levels and displayed as a regular text. A button can be raised by having "p-button-raised" style class and similarly borders can be made rounded using "p-button-rounded" class. A button can be raised by having "p-button-raised" style class and similarly borders can be made rounded using "p-button-rounded" class. An alternate styling for a button is the outlined option where background becomes transparent. Apply "p-button-outlined" to style a button as outlined. An alternate styling for a button is the outlined option where background becomes transparent. Apply "p-button-outlined" to style a button as outlined. Use "p-button-link" class to render the button as a link. Use "p-button-link" class to render the button as a link. Badge is a small status indicator for a button. Refer to the Badge is a small status indicator for a button. Refer to the Wrapping the buttons in a container having a .p-buttonset class, groups the buttons side to side. Wrapping the buttons in a container having a .p-buttonset class, groups the buttons side to side. 2 more sizes are available in addition to a regular button, for a smaller input add p-button-sm and for a larger one, use p-button-lg.
- Note that these classes available to change the size of a particular button, for global scaling see the 2 more sizes are available in addition to a regular button, for a smaller input add p-button-sm and for a larger one, use p-button-lg.
+ Note that these classes available to change the size of a particular button, for global scaling see the Custom content can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included. Custom content can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included. Any property such as style and class are passed to the underlying button element. Following are the additional properties to configure the component. Any property such as style and class are passed to the underlying button element. Following are the additional properties to configure the component. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. Two-way value binding is defined using the standard v-model directive referencing to a Date property. Two-way value binding is defined using the standard v-model directive referencing to a Date property. Calendar is displayed in a popup by default and inline property needs to be enabled for inline mode. Calendar is displayed in a popup by default and inline property needs to be enabled for inline mode. By default calendar allows selecting one date only whereas multiple dates can be selected by setting selectionMode to multiple. In this
- case calendar updates the value with an array of dates where optionally number of selectable dates can be restricted with maxDateCount property.
- Third alternative is the range mode that allows selecting a range based on an array of two values where first value is the start date and second value
- is the end date. By default calendar allows selecting one date only whereas multiple dates can be selected by setting selectionMode to multiple. In this
+ case calendar updates the value with an array of dates where optionally number of selectable dates can be restricted with maxDateCount property.
+ Third alternative is the range mode that allows selecting a range based on an array of two values where first value is the start date and second value
+ is the end date. Default date format is mm/dd/yy, to customize this use dateFormat property or define it at Default date format is mm/dd/yy, to customize this use dateFormat property or define it at Following options can be a part of the format. Following options can be a part of the format. TimePicker is enabled with showTime property and 24 (default) or 12 hour mode is configured using hourFormat option. If you
- need to use the time picker as standalone, use the timeOnly property.
- TimePicker is enabled with showTime property and 24 (default) or 12 hour mode is configured using hourFormat option. If you
+ need to use the time picker as standalone, use the timeOnly property.
+ To disable entering dates manually, set manualInput to true and to restrict selectable dates with the minDate
- and maxDate options. To disable entering dates manually, set manualInput to true and to restrict selectable dates with the minDate
+ and maxDate options. To disable specific dates or days, restrict selectable dates use disabledDates and/or disabledDays options. To disable specific dates or days, restrict selectable dates use disabledDates and/or disabledDays options. Button bar displays today and clear buttons and enabled using showButtonBar property. Button bar displays today and clear buttons and enabled using showButtonBar property. Displaying multiple months is enabled by setting numberOfMonths property to a value greater than 1. Displaying multiple months is enabled by setting numberOfMonths property to a value greater than 1. Locale for different languages and formats is defined globally, refer to the Locale for different languages and formats is defined globally, refer to the Calendar UI accepts custom content using header and footer templates. Calendar UI accepts custom content using header and footer templates. In addition, cell contents can be templated using a template named "date". This is a handy feature to highlight specific dates. Note that the date property of the slot props
- passed to the template is not a date instance but a metadata object to represent a Date with "day", "month" and "year" properties. Example below
- changes the background color of dates between 10th and 15th of each month. In addition, cell contents can be templated using a template named "date". This is a handy feature to highlight specific dates. Note that the date property of the slot props
+ passed to the template is not a date instance but a metadata object to represent a Date with "day", "month" and "year" properties. Example below
+ changes the background color of dates between 10th and 15th of each month. Month picker is used to select month and year only without the date, set view mode as "month" to activate month picker. Month picker is used to select month and year only without the date, set view mode as "month" to activate month picker. Touch UI mode displays the calendar overlay at the center of the screen as optimized for touch devices. Touch UI mode displays the calendar overlay at the center of the screen as optimized for touch devices. Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. CascadeSelect requires a value to bind and a collection of arbitrary objects with a nested hierarchy. optionGroupLabel
- is used for the text of a category and optionGroupChildren is to define the children of the category. Note that order of the optionGroupChildren
- matters and it should correspond to the data hierarchy. CascadeSelect requires a value to bind and a collection of arbitrary objects with a nested hierarchy. optionGroupLabel
+ is used for the text of a category and optionGroupChildren is to define the children of the category. Note that order of the optionGroupChildren
+ matters and it should correspond to the data hierarchy. Content of an item can be customized with the option template. Content of an item can be customized with the option template. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. Checkbox can either be used in multiple selection with other checkboxes or as a single checkbox to provide a boolean value. Checkbox can either be used in multiple selection with other checkboxes or as a single checkbox to provide a boolean value. Multiple mode is enabled by default, v-model property refers to an array to bind the selected values. Multiple mode is enabled by default, v-model property refers to an array to bind the selected values. As v-model is two-way binding enabled, prepopulating the model array with values is enough to display the related
- checkboxes as checked by default. As v-model is two-way binding enabled, prepopulating the model array with values is enough to display the related
+ checkboxes as checked by default. Any property such as name and autofocus are passed to the underlying input element. Following are the additional properties to configure the component. Any property such as name and autofocus are passed to the underlying input element. Following are the additional properties to configure the component. Any valid event such as focus and blur. Any valid event such as focus and blur. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. An array as the value can be bound using the standard v-model directive. An array as the value can be bound using the standard v-model directive. A chip is customized using the chip template where the chip value is passed to the slotProps with the value property. A chip is customized using the chip template where the chip value is passed to the slotProps with the value property. Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. A model can be bound using the standard v-model directive. Default color format to use in value binding is "hex" and other possible values are "rgb" and "hsb". A model can be bound using the standard v-model directive. Default color format to use in value binding is "hex" and other possible values are "rgb" and "hsb". ColorPicker is displayed as an overlay with a preview option by default where second alternative is the inline mode. ColorPicker is displayed as an overlay with a preview option by default where second alternative is the inline mode. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Following is the list style classed of the component. Following is the list style classed of the component. None. None. Dropdown requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option. Dropdown requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option. Common pattern is providing an empty option as the placeholder when using native selects, however Dropdown has built-in support using the placeholder option so it is suggested to use it instead of creating an empty option. Common pattern is providing an empty option as the placeholder when using native selects, however Dropdown has built-in support using the placeholder option so it is suggested to use it instead of creating an empty option. Options groups are specified with the optionGroupLabel and optionGroupChildren properties. Options groups are specified with the optionGroupLabel and optionGroupChildren properties. Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default,
- optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available
- to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith". Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default,
+ optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available
+ to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith". Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter.
- In addition value, optiongroup, header, footer, emptyfilter and empty slots are provided for further customization. Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter.
+ In addition value, optiongroup, header, footer, emptyfilter and empty slots are provided for further customization. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Any property as style and class are passed to the main container element. Following are the additional properties to configure the component. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit None. None. A model can be bound using the standard v-model directive. A model can be bound using the standard v-model directive. Editor provides a default toolbar with common options, to customize it define your elements inside the header element. Refer to Quill documentation for available controls. Editor provides a default toolbar with common options, to customize it define your elements inside the header element. Refer to Quill documentation for available controls. Refer to Quill documentation for more information. Refer to Quill documentation for more information. Following is the list of structural style classes, for theming classes visit Following is the list of structural style classes, for theming classes visit Quill Editor 1.3+. Resources of quill needs to be added to your application. Quill Editor 1.3+. Resources of quill needs to be added to your application.Import
+ Import
-
import AutoComplete from 'primevue/autocomplete';
Getting Started
- Getting Started
+
-
<AutoComplete v-model="selectedCountry" :suggestions="filteredCountriesBasic" @complete="searchCountry($event)" field="name" />
@@ -36,34 +34,34 @@ export default {
Dropdown
- Dropdown
+
-
<AutoComplete v-model="brand" :dropdown="true" :suggestions="filteredBrands" @complete="searchBrand($event)" placeholder="Hint: type 'v' or 'f'" />
Multiple Mode
- Multiple Mode
+
-
<AutoComplete :multiple="true" v-model="selectedCountries" :suggestions="filteredCountriesMultiple" @complete="searchCountryMultiple($event)" field="name" />
Objects
- Objects
+
-
<AutoComplete field="label" v-model="selectedCountry" :suggestions="filteredCountriesBasic" @complete="searchCountryBasic($event)" />
Grouping
- Grouping
+
-
export default {
data() {
@@ -107,17 +105,17 @@ export default {
Force Selection
- Force Selection
+
-
<AutoComplete forceSelection v-model="brand" :suggestions="filteredBrands" @complete="searchBrand($event)" />
Templating
- Templating
+
-
<AutoComplete v-model="brand" :suggestions="filteredBrands" @complete="searchBrand($event)" placeholder="Hint: type 'v' or 'f'" :dropdown="true">
<template #item="slotProps">
@@ -128,412 +126,289 @@ export default {
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- any
- null
- Value of the component.
-
-
- suggestions
- array
- null
- An array of suggestions to display.
-
-
- field
- any
- null
- Property name or getter function of a suggested object to resolve and display.
-
-
- optionGroupLabel
- string
- null
- Property name or getter function to use as the label of an option group.
-
-
- optionGroupChildren
- string
- null
- Property name or getter function that refers to the children options of option group.
-
-
- scrollHeight
- string
- 200px
- Maximum height of the suggestions panel.
-
-
- dropdown
- boolean
- false
- Displays a button next to the input field when enabled.
-
-
- dropdownMode
- string
- blank
- Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
-
-
- multiple
- boolean
- false
- Specifies if multiple values can be selected.
-
-
- minLength
- number
- 1
- Minimum number of characters to initiate a search.
-
-
- delay
- number
- 300
- Delay between keystrokes to wait before sending a query.
-
-
- appendTo
- string
- body
- A valid query selector or an HTMLElement to specify where the overlay gets attached.
-
-
- inputStyle
- any
- null
- Inline style of the input field.
-
-
- inputClass
- string
- null
- Style class of the input field.
-
-
-
- forceSelection
- boolean
- false
- When present, autocomplete clears the manual input if it does not match of the suggestions to force only
- accepting values from the suggestions.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ any
+ null
+ Value of the component.
+
+
+ suggestions
+ array
+ null
+ An array of suggestions to display.
+
+
+ field
+ any
+ null
+ Property name or getter function of a suggested object to resolve and display.
+
+
+ optionGroupLabel
+ string
+ null
+ Property name or getter function to use as the label of an option group.
+
+
+ optionGroupChildren
+ string
+ null
+ Property name or getter function that refers to the children options of option group.
+
+
+ scrollHeight
+ string
+ 200px
+ Maximum height of the suggestions panel.
+
+
+ dropdown
+ boolean
+ false
+ Displays a button next to the input field when enabled.
+
+
+ dropdownMode
+ string
+ blank
+ Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
+
+
+ multiple
+ boolean
+ false
+ Specifies if multiple values can be selected.
+
+
+ minLength
+ number
+ 1
+ Minimum number of characters to initiate a search.
+
+
+ delay
+ number
+ 300
+ Delay between keystrokes to wait before sending a query.
+
+
+ appendTo
+ string
+ body
+ A valid query selector or an HTMLElement to specify where the overlay gets attached.
+
+
+ inputStyle
+ any
+ null
+ Inline style of the input field.
+
+
+ inputClass
+ string
+ null
+ Style class of the input field.
+
+
+
+ forceSelection
+ boolean
+ false
+ When present, autocomplete clears the manual input if it does not match of the suggestions to force only
+ accepting values from the suggestions.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- complete
-
- event.originalEvent: Browser event
-
- event.query: Value to search with
- Callback to invoke to search for suggestions.
-
-
- item-select
- event.originalEvent: Browser event
-
- event.value: Selected itemCallback to invoke when a suggestion is selected.
-
-
- item-unselect
- event.originalEvent: Browser event
-
- event.value: Unselected itemCallback to invoke when a selected value is removed.
-
-
- dropdown-click
-
- event.originalEvent: browser event
-
- event.query: Current value of the input field
- Callback to invoke to when dropdown button is clicked.
-
-
-
- clear
- event: Browser event
- Callback to invoke when input is cleared by the user.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ complete
+
+ event.originalEvent: Browser event
+
+ event.query: Value to search with
+ Callback to invoke to search for suggestions.
+
+
+ item-select
+ event.originalEvent: Browser event
+
+ event.value: Selected itemCallback to invoke when a suggestion is selected.
+
+
+ item-unselect
+ event.originalEvent: Browser event
+
+ event.value: Unselected itemCallback to invoke when a selected value is removed.
+
+
+ dropdown-click
+
+ event.originalEvent: browser event
+
+ event.query: Current value of the input field
+ Callback to invoke to when dropdown button is clicked.
+
+
+
+ clear
+ event: Browser event
+ Callback to invoke when input is cleared by the user.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
- item
- item: Option instance
-
- index: Index of the option
-
- optiongroup
- item: OptionGroup instance
-
- index: Index of the option group
-
- header
- value: Value of the component
-
- suggestions: Displayed options
-
-
- footer
- value: Value of the component
-
- suggestions: Displayed optionsSlots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+ item
+ item: Option instance
+
+ index: Index of the option
+
+ optiongroup
+ item: OptionGroup instance
+
+ index: Index of the option group
+
+ header
+ value: Value of the component
+
+ suggestions: Displayed options
+
+
+ footer
+ value: Value of the component
+
+ suggestions: Displayed optionsStyling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-autocomplete
- Container element
-
-
- p-autocomplete-panel
- Overlay panel of suggestions.
-
-
- p-autocomplete-items
- List container of suggestions.
-
-
- p-autocomplete-item
- List item of a suggestion.
-
-
- p-autocomplete-token
- Element of a selected item in multiple mode.
-
-
- p-autocomplete-token-icon
- Close icon element of a selected item in multiple mode.
-
-
-
- p-autocomplete-token-label
- Label of a selected item in multiple mode.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-autocomplete
+ Container element
+
+
+ p-autocomplete-panel
+ Overlay panel of suggestions.
+
+
+ p-autocomplete-items
+ List container of suggestions.
+
+
+ p-autocomplete-item
+ List item of a suggestion.
+
+
+ p-autocomplete-token
+ Element of a selected item in multiple mode.
+
+
+ p-autocomplete-token-icon
+ Close icon element of a selected item in multiple mode.
+
+
+
+ p-autocomplete-token-label
+ Label of a selected item in multiple mode.
+ Dependencies
-
-
-
-<h5>Basic</h5>
-<AutoComplete v-model="selectedCountry1" :suggestions="filteredCountries" @complete="searchCountry($event)" field="name" />
-
-<h5>Grouped</h5>
-<AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="searchCity($event)" field="label" optionGroupLabel="label" optionGroupChildren="items">
- <template #optiongroup="slotProps">
- <div class="p-d-flex p-ai-center country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.item.code.toLowerCase()" width="18" />
- <div>{{slotProps.item.label}}</div>
- </div>
- </template>
-</AutoComplete>
-
-<h5>Dropdown, Templating and Force Selection</h5>
-<AutoComplete v-model="selectedCountry2" :suggestions="filteredCountries" @complete="searchCountry($event)" :dropdown="true" field="name" forceSelection>
- <template #item="slotProps">
- <div class="country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.item.code.toLowerCase()" />
- <div>{{slotProps.item.name}}</div>
- </div>
- </template>
-</AutoComplete>
-
-<h5>Multiple</h5>
-<span class="p-fluid">
- <AutoComplete :multiple="true" v-model="selectedCountries" :suggestions="filteredCountries" @complete="searchCountry($event)" field="name" />
-</span>
-
-
-
-import CountryService from '../../service/CountryService';
-import {FilterService,FilterMatchMode} from 'primevue/api';
-
-export default {
- data() {
- return {
- countries: null,
- selectedCountry1: null,
- selectedCountry2: null,
- selectedCity: null,
- filteredCities: null,
- filteredCountries: null,
- selectedCountries: [],
- groupedCities: [{
- label: 'Germany', code: 'DE',
- items: [
- {label: 'Berlin', value: 'Berlin'},
- {label: 'Frankfurt', value: 'Frankfurt'},
- {label: 'Hamburg', value: 'Hamburg'},
- {label: 'Munich', value: 'Munich'}
- ]
- },
- {
- label: 'USA', code: 'US',
- items: [
- {label: 'Chicago', value: 'Chicago'},
- {label: 'Los Angeles', value: 'Los Angeles'},
- {label: 'New York', value: 'New York'},
- {label: 'San Francisco', value: 'San Francisco'}
- ]
- },
- {
- label: 'Japan', code: 'JP',
- items: [
- {label: 'Kyoto', value: 'Kyoto'},
- {label: 'Osaka', value: 'Osaka'},
- {label: 'Tokyo', value: 'Tokyo'},
- {label: 'Yokohama', value: 'Yokohama'}
- ]
- }]
- }
- },
- countryService: null,
- created() {
- this.countryService = new CountryService();
- },
- mounted() {
- this.countryService.getCountries().then(data => this.countries = data);
- },
- methods: {
- searchCountry(event) {
- setTimeout(() => {
- if (!event.query.trim().length) {
- this.filteredCountries = [...this.countries];
- }
- else {
- this.filteredCountries = this.countries.filter((country) => {
- return country.name.toLowerCase().startsWith(event.query.toLowerCase());
- });
- }
- }, 250);
- },
- searchCity(event) {
- let query = event.query;
- let filteredCities = [];
-
- for (let country of this.groupedCities) {
- let filteredItems = FilterService.filter(country.items, ['label'], query, FilterMatchMode.CONTAINS);
- if (filteredItems && filteredItems.length) {
- filteredCities.push({...country, ...{items: filteredItems}});
- }
- }
-
- this.filteredCities = filteredCities;
- }
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import Button from 'primevue/button';
Getting Started
- Getting Started
+
-
<Button />
Label
- Label
+
-
<Button label="Submit" />
Icons
- Icons
+
-
<Button label="Submit" icon="pi pi-check" iconPos="right" />
Events
- Events
+
-
<Button label="Submit" @click="handleClick($event)"/>
Severity
- Severity
+
-
+
+
-
<Button label="Primary" />
@@ -59,9 +57,9 @@ import Button from 'primevue/button';
Text Buttons
- Text Buttons
+
-
<Button label="Submit" class="p-button-text" />
<Button icon="pi pi-check" class="p-button-text" />
@@ -70,29 +68,29 @@ import Button from 'primevue/button';
Raised and Rounded Buttons
- Raised and Rounded Buttons
+
-
<Button label="Primary" class="p-button-raised p-button-rounded" />
Outlined Buttons
- Outlined Buttons
+
-
<Button label="Primary" class="p-button-outlined" />
Link Buttons
- Link Buttons
+
-
<Button label="Link" class="p-button-link" />
Badges
- Badges
+
-
<Button type="button" label="Emails" badge="8" />
@@ -100,8 +98,8 @@ import Button from 'primevue/button';
ButtonSet
- ButtonSet
+
-
<span class="p-buttonset">
<Button label="Save" icon="pi pi-check" />
@@ -111,9 +109,9 @@ import Button from 'primevue/button';
Sizes
- Sizes
+
-
<Button label="Small" icon="pi pi-check" class="p-button-sm" />
<Button label="Normal" icon="pi pi-check" class="p-button" />
@@ -121,8 +119,8 @@ import Button from 'primevue/button';
Slot
- Slot
+
-
<Button>
Custom Content
@@ -130,367 +128,433 @@ import Button from 'primevue/button';
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- label
- string
- null
- Text of the button.
-
-
- icon
- string
- null
- Name of the icon.
-
-
- iconPos
- string
- left
- Position of the icon, valid values are "left", "right", "bottom" and "top".
-
-
- badge
- string
- null
- Value of the badge.
-
-
-
- badgeClass
- string
- null
- Style class of the badge.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ label
+ string
+ null
+ Text of the button.
+
+
+ icon
+ string
+ null
+ Name of the icon.
+
+
+ iconPos
+ string
+ left
+ Position of the icon, valid values are "left", "right", "bottom" and "top".
+
+
+ badge
+ string
+ null
+ Value of the badge.
+
+
+
+ badgeClass
+ string
+ null
+ Style class of the badge.
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-button
- Button element
-
-
- p-button-icon
- Icon element
-
-
- p-button-label
- Label element of the button
-
-
- p-button-sm
- Smaller button element
-
-
-
- p-button-lg
- Larger button element
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-button
+ Button element
+
+
+ p-button-icon
+ Icon element
+
+
+ p-button-label
+ Label element of the button
+
+
+ p-button-sm
+ Smaller button element
+
+
+
+ p-button-lg
+ Larger button element
+ Dependencies
-
-
-
-<h5>Basic</h5>
-<Button label="Submit" />
-<Button label="Disabled" disabled="disabled" />
-<Button label="Link" class="p-button-link" />
-
-<h5>Icons</h5>
-<Button icon="pi pi-check" />
-<Button label="Submit" icon="pi pi-check" />
-<Button label="Submit" icon="pi pi-check" iconPos="right" />
-
-<h5>Severities</h5>
-<Button label="Primary" />
-<Button label="Secondary" class="p-button-secondary" />
-<Button label="Success" class="p-button-success" />
-<Button label="Info" class="p-button-info" />
-<Button label="Warning" class="p-button-warning" />
-<Button label="Help" class="p-button-help" />
-<Button label="Danger" class="p-button-danger" />
-
-<h5>Raised Buttons</h5>
-<Button label="Primary" class="p-button-raised" />
-<Button label="Secondary" class="p-button-raised p-button-secondary" />
-<Button label="Success" class="p-button-raised p-button-success" />
-<Button label="Info" class="p-button-raised p-button-info" />
-<Button label="Warning" class="p-button-raised p-button-warning" />
-<Button label="Help" class="p-button-raised p-button-help" />
-<Button label="Danger" class="p-button-raised p-button-danger" />
-
-<h5>Rounded Buttons</h5>
-<Button label="Primary" class="p-button-rounded" />
-<Button label="Secondary" class="p-button-rounded p-button-secondary" />
-<Button label="Success" class="p-button-rounded p-button-success" />
-<Button label="Info" class="p-button-rounded p-button-info" />
-<Button label="Warning" class="p-button-rounded p-button-warning" />
-<Button label="Help" class="p-button-rounded p-button-help" />
-<Button label="Danger" class="p-button-rounded p-button-danger" />
-
-<h5>Text Buttons</h5>
-<Button label="Primary" class="p-button-text" />
-<Button label="Secondary" class="p-button-secondary p-button-text" />
-<Button label="Success" class="p-button-success p-button-text" />
-<Button label="Info" class="p-button-info p-button-text" />
-<Button label="Warning" class="p-button-warning p-button-text" />
-<Button label="Help" class="p-button-help p-button-text" />
-<Button label="Danger" class="p-button-danger p-button-text" />
-<Button label="Plain" class="p-button-text p-button-plain" />
-
-<h5>Raised Text Buttons</h5>
-<Button label="Primary" class="p-button-raised p-button-text" />
-<Button label="Secondary" class="p-button-raised p-button-secondary p-button-text" />
-<Button label="Success" class="p-button-raised p-button-success p-button-text" />
-<Button label="Info" class="p-button-raised p-button-info p-button-text" />
-<Button label="Warning" class="p-button-raised p-button-warning p-button-text" />
-<Button label="Help" class="p-button-raised p-button-help p-button-text" />
-<Button label="Danger" class="p-button-raised p-button-danger p-button-text" />
-<Button label="Plain" class="p-button-raised p-button-text p-button-plain" />
-
-<h5>Outlined Buttons</h5>
-<Button label="Primary" class="p-button-outlined" />
-<Button label="Secondary" class="p-button-outlined p-button-secondary" />
-<Button label="Success" class="p-button-outlined p-button-success" />
-<Button label="Info" class="p-button-outlined p-button-info" />
-<Button label="Warning" class="p-button-outlined p-button-warning" />
-<Button label="Help" class="p-button-outlined p-button-help" />
-<Button label="Danger" class="p-button-outlined p-button-danger" />
-
-<h5>Rounded Icon Buttons</h5>
-<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary" />
-<Button icon="pi pi-search" class="p-button-rounded p-button-success" />
-<Button icon="pi pi-user" class="p-button-rounded p-button-info" />
-<Button icon="pi pi-bell" class="p-button-rounded p-button-warning" />
-<Button icon="pi pi-heart" class="p-button-rounded p-button-help" />
-<Button icon="pi pi-times" class="p-button-rounded p-button-danger" />
-<Button icon="pi pi-check" class="p-button-rounded" />
-
-<h5>Rounded Text Icon Buttons</h5>
-<Button icon="pi pi-check" class="p-button-rounded p-button-text" />
-<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-text" />
-<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-text" />
-<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-text" />
-<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-text" />
-<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-text" />
-<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-text" />
-<Button icon="pi pi-filter" class="p-button-rounded p-button-text p-button-plain" />
-
-<h5>Rounded and Outlined Icon Buttons</h5>
-<Button icon="pi pi-check" class="p-button-rounded p-button-outlined" />
-<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-outlined" />
-<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-outlined" />
-<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-outlined" />
-<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-outlined" />
-<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-outlined" />
-<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-outlined" />
-
-<h5>Badges</h5>
-<Button type="button" label="Emails" badge="8" />
-<Button type="button" label="Messages" icon="pi pi-users" class="p-button-warning" badge="8" badgeClass="p-badge-danger" />
-
-<h5>Button Set</h5>
-<span class="p-buttonset">
- <Button label="Save" icon="pi pi-check" />
- <Button label="Delete" icon="pi pi-trash" />
- <Button label="Cancel" icon="pi pi-times" />
-</span>
-
-<h5>Sizes</h5>
-<div class="sizes">
- <Button label="Small" icon="pi pi-check" class="p-button-sm" />
- <Button label="Normal" icon="pi pi-check" class="p-button" />
- <Button label="Large" icon="pi pi-check" class="p-button-lg" />
-</div>
-
-
-
-button {
- margin-right: .5rem;
-}
-
-
Dependencies
+ Import
+ Import
-
import Calendar from 'primevue/calendar';
Getting Started
- Getting Started
+
-
<Calendar v-model="value" />
@@ -27,57 +25,57 @@ export default {
Popup and Inline
- Popup and Inline
+
-
<Calendar v-model="value" :inline="true" />
Selection Mode
- Selection Mode
+
-
<Calendar v-model="value" selectionMode="single || multiple || range" />
DateFormat
- DateFormat
+
-
<Calendar v-model="value" dateFormat="dd.mm.yy" />
-
+
+
- Time
- Time
+
-
<Calendar v-model="value" :showTime="true" />
<Calendar v-model="value" :showTime="true" hourFormat="12" />
@@ -85,39 +83,39 @@ export default {
Date Restriction
- Date Restriction
+
-
<Calendar v-model="value" :minDate="minDateValue" maxDate="maxDateValue" />
-
<Calendar v-model="value" :disabledDates="invalidDates" :disabledDays="[0,6]" />
Button Bar
- Button Bar
+
-
<Calendar v-model="value" :showButtonBar="true" />
Multiple Months
- Multiple Months
+
-
<Calendar v-model="value" :numberOfMonths="3" />
Locale
- Locale
+ Custom Content
- Custom Content
+
-
<Calendar v-model="value">
@@ -127,9 +125,9 @@ export default {
-
<Calendar v-model="value">
@@ -148,650 +146,508 @@ export default {
Month Picker
- Month Picker
+
-
<Calendar v-model="value" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
Touch UI
- Touch UI
+
-
<Calendar v-model="value" :touchUI="true" />
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- any
- null
- Value of the component.
-
-
- selectionMode
- string
- single
- Defines the quantity of the selection, valid values are "single", "multiple" and "range".
-
-
- dateFormat
- string
- null
- Format of the date. Defaults to PrimeVue
-
-
- inline
- boolean
- false
- When enabled, displays the calendar as inline instead of an overlay.
-
-
- showOtherMonths
- boolean
- true
- Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.
-
-
- selectOtherMonths
- boolean
- false
- Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.
-
-
- showIcon
- boolean
- false
- When enabled, displays a button with icon next to input.
-
-
- icon
- string
- pi pi-calendar
- Icon of the calendar button.
-
-
- numberOfMonths
- number
- 1
- Number of months to display.
-
-
- view
- string
- date
- Type of view to display, valid valids are "date" for datepicker and "month" for month picker.
-
-
- touchUI
- boolean
- false
- When enabled, calendar overlay is displayed as optimized for touch devices.
-
-
- monthNavigator
- boolean
- false
- Whether the month should be rendered as a dropdown instead of text.
-
-
- yearNavigator
- boolean
- false
- Whether the year should be rendered as a dropdown instead of text.
-
-
- yearRange
- string
- null
- The range of years displayed in the year drop-down in (nnnn:nnnn) format such as (2000:2020).
-
-
- panelClass
- string
- null
- Style class of the datetimepicker panel.
-
-
- panelStyle
- object
- null
- Inline style of the datetimepicker panel.
-
-
- minDate
- Date
- null
- The minimum selectable date.
-
-
- maxDate
- Date
- null
- The maximum selectable date.
-
-
- disabledDates
- array;
- null
- Array with dates to disable.
-
-
- disabledDays
- array
- null
- Array with disabled weekday numbers.
-
-
- maxDateCount
- number
- null
- Maximum number of selectable dates in multiple mode.
-
-
- showOnFocus
- boolean
- true
- When disabled, datepicker will not be visible with input focus.
-
-
- autoZIndex
- boolean
- true
- Whether to automatically manage layering.
-
-
- baseZIndex
- number
- 0
- Base zIndex value to use in layering.
-
-
- showButtonBar
- boolean
- false
- Whether to display today and clear buttons at the footer
-
-
- shortYearCutoff
- string
- +10
- The cutoff year for determining the century for a date.
-
-
- showTime
- boolean
- false
- Whether to display timepicker.
-
-
- timeOnly
- boolean
- false
- Whether to display timepicker only.
-
-
- hourFormat
- string
- 24
- Specifies 12 or 24 hour format.
-
-
- stepHour
- number
- 1
- Hours to change per step.
-
-
- stepMinute
- number
- 1
- Minutes to change per step.
-
-
- stepSecond
- number
- 1
- Seconds to change per step.
-
-
- showSeconds
- boolean
- false
- Whether to show the seconds in time picker.
-
-
- hideOnDateTimeSelect
- boolean
- false
- Whether to hide the overlay on date selection when showTime is enabled.
-
-
- timeSeparator
- string
- :
- Separator of time selector.
-
-
- showWeek
- boolean
- false
- When enabled, calendar will show week numbers.
-
-
- manualInput
- boolean
- true
- Wheter to allow prevents entering the date manually via typing.
-
-
- appendTo
- string
- body
- A valid query selector or an HTMLElement to specify where the overlay gets attached.
-
-
- inputStyle
- any
- null
- Inline style of the input field.
-
-
-
- inputClass
- string
- null
- Style class of the input field.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ any
+ null
+ Value of the component.
+
+
+ selectionMode
+ string
+ single
+ Defines the quantity of the selection, valid values are "single", "multiple" and "range".
+
+
+ dateFormat
+ string
+ null
+ Format of the date. Defaults to PrimeVue
+
+
+ inline
+ boolean
+ false
+ When enabled, displays the calendar as inline instead of an overlay.
+
+
+ showOtherMonths
+ boolean
+ true
+ Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.
+
+
+ selectOtherMonths
+ boolean
+ false
+ Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.
+
+
+ showIcon
+ boolean
+ false
+ When enabled, displays a button with icon next to input.
+
+
+ icon
+ string
+ pi pi-calendar
+ Icon of the calendar button.
+
+
+ numberOfMonths
+ number
+ 1
+ Number of months to display.
+
+
+ view
+ string
+ date
+ Type of view to display, valid valids are "date" for datepicker and "month" for month picker.
+
+
+ touchUI
+ boolean
+ false
+ When enabled, calendar overlay is displayed as optimized for touch devices.
+
+
+ monthNavigator
+ boolean
+ false
+ Whether the month should be rendered as a dropdown instead of text.
+
+
+ yearNavigator
+ boolean
+ false
+ Whether the year should be rendered as a dropdown instead of text.
+
+
+ yearRange
+ string
+ null
+ The range of years displayed in the year drop-down in (nnnn:nnnn) format such as (2000:2020).
+
+
+ panelClass
+ string
+ null
+ Style class of the datetimepicker panel.
+
+
+ panelStyle
+ object
+ null
+ Inline style of the datetimepicker panel.
+
+
+ minDate
+ Date
+ null
+ The minimum selectable date.
+
+
+ maxDate
+ Date
+ null
+ The maximum selectable date.
+
+
+ disabledDates
+ array;
+ null
+ Array with dates to disable.
+
+
+ disabledDays
+ array
+ null
+ Array with disabled weekday numbers.
+
+
+ maxDateCount
+ number
+ null
+ Maximum number of selectable dates in multiple mode.
+
+
+ showOnFocus
+ boolean
+ true
+ When disabled, datepicker will not be visible with input focus.
+
+
+ autoZIndex
+ boolean
+ true
+ Whether to automatically manage layering.
+
+
+ baseZIndex
+ number
+ 0
+ Base zIndex value to use in layering.
+
+
+ showButtonBar
+ boolean
+ false
+ Whether to display today and clear buttons at the footer
+
+
+ shortYearCutoff
+ string
+ +10
+ The cutoff year for determining the century for a date.
+
+
+ showTime
+ boolean
+ false
+ Whether to display timepicker.
+
+
+ timeOnly
+ boolean
+ false
+ Whether to display timepicker only.
+
+
+ hourFormat
+ string
+ 24
+ Specifies 12 or 24 hour format.
+
+
+ stepHour
+ number
+ 1
+ Hours to change per step.
+
+
+ stepMinute
+ number
+ 1
+ Minutes to change per step.
+
+
+ stepSecond
+ number
+ 1
+ Seconds to change per step.
+
+
+ showSeconds
+ boolean
+ false
+ Whether to show the seconds in time picker.
+
+
+ hideOnDateTimeSelect
+ boolean
+ false
+ Whether to hide the overlay on date selection when showTime is enabled.
+
+
+ timeSeparator
+ string
+ :
+ Separator of time selector.
+
+
+ showWeek
+ boolean
+ false
+ When enabled, calendar will show week numbers.
+
+
+ manualInput
+ boolean
+ true
+ Wheter to allow prevents entering the date manually via typing.
+
+
+ appendTo
+ string
+ body
+ A valid query selector or an HTMLElement to specify where the overlay gets attached.
+
+
+ inputStyle
+ any
+ null
+ Inline style of the input field.
+
+
+
+ inputClass
+ string
+ null
+ Style class of the input field.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- date-select
- value: Selected value
- Callback to invoke when a date is selected.
-
-
- show
- -
- Callback to invoke when datepicker panel is shown.
-
-
- hide
- -
- Callback to invoke when datepicker panel is hidden.
-
-
- today-click
- date: Today as a date instance
- Callback to invoke when today button is clicked.
-
-
- clear-click
- event: Click event
- Callback to invoke when clear button is clicked.
-
-
- month-change
- event.month: New month
-
- event.year: New year
- Callback to invoke when a month is changed using the navigators.
-
-
-
- year-change
- event.month: New month
-
- event.year: New year
- Callback to invoke when a year is changed using the navigators.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ date-select
+ value: Selected value
+ Callback to invoke when a date is selected.
+
+
+ show
+ -
+ Callback to invoke when datepicker panel is shown.
+
+
+ hide
+ -
+ Callback to invoke when datepicker panel is hidden.
+
+
+ today-click
+ date: Today as a date instance
+ Callback to invoke when today button is clicked.
+
+
+ clear-click
+ event: Click event
+ Callback to invoke when clear button is clicked.
+
+
+ month-change
+ event.month: New month
+
+ event.year: New year
+ Callback to invoke when a month is changed using the navigators.
+
+
+
+ year-change
+ event.month: New month
+
+ event.year: New year
+ Callback to invoke when a year is changed using the navigators.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
- header
- -
-
-
- footer
- -
-
-
-
- date
- date: Value of the component
- Slots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+ header
+ -
+
+
+ footer
+ -
+
+
+
+ date
+ date: Value of the component
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-calendar
- Main container element
-
-
- p-calendar-w-btn
- Main container element when button is enabled.
-
-
- p-calendar-timeonly
- Main container element in time picker only mode.
-
-
- p-inputtext
- Input element
-
-
- p-datepicker
- Datepicker element
-
-
- p-datepicker-inline
- Datepicker element in inline mode
-
-
- p-monthpicker
- Datepicker element in month view.
-
-
- p-monthpicker-month
- Month cell in month view mode.
-
-
- p-datepicker-touch-ui
- Datepicker element in touch ui mode.
-
-
- p-datepicker-calendar
- Table containing dates of a month.
-
-
- p-datepicker-current-day
- Cell of selected date.
-
-
-
- p-datepicker-today
- Cell of today's date.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-calendar
+ Main container element
+
+
+ p-calendar-w-btn
+ Main container element when button is enabled.
+
+
+ p-calendar-timeonly
+ Main container element in time picker only mode.
+
+
+ p-inputtext
+ Input element
+
+
+ p-datepicker
+ Datepicker element
+
+
+ p-datepicker-inline
+ Datepicker element in inline mode
+
+
+ p-monthpicker
+ Datepicker element in month view.
+
+
+ p-monthpicker-month
+ Month cell in month view mode.
+
+
+ p-datepicker-touch-ui
+ Datepicker element in touch ui mode.
+
+
+ p-datepicker-calendar
+ Table containing dates of a month.
+
+
+ p-datepicker-current-day
+ Cell of selected date.
+
+
+
+ p-datepicker-today
+ Cell of today's date.
+ Dependencies
-
-
-
-<h5>Popup</h5>
-<div class=" p-fluid p-grid p-formgrid">
- <div class="p-field p-col-12 p-md-4">
- <label for="basic">Basic</label>
- <Calendar id="basic" v-model="date1" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="dateformat">Spanish</label>
- <Calendar id="dateformat" v-model="date2" dateFormat="mm-dd-yy" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="icon">Icon</label>
- <Calendar id="icon" v-model="date3" :showIcon="true" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="minmax">MinMax</label>
- <Calendar id="minmax" v-model="date4" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="disableddays">Disabled Days</label>
- <Calendar id="disableddays" v-model="date5" :disabledDates="invalidDates" :disabledDays="[0,6]" :manualInput="false" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="navigators">Navigators</label>
- <Calendar id="navigators" v-model="date6" :monthNavigator="true" :yearNavigator="true" yearRange="2000:2030" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="multiple">Multiple</label>
- <Calendar id="multiple" v-model="dates1" selectionMode="multiple" :manualInput="false" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="range">Range</label>
- <Calendar id="range" v-model="dates2" selectionMode="range" :manualInput="false" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="buttonbar">Button Bar</label>
- <Calendar id="buttonbar" v-model="date7" :showButtonBar="true" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="time24">Time / 24h</label>
- <Calendar id="time24" v-model="date8" :showTime="true" :showSeconds="true" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="time12">Time / 12h</label>
- <Calendar id="time12" v-model="date9" :timeOnly="true" hourFormat="12" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="monthpicker">Month Picker</label>
- <Calendar id="monthpicker" v-model="date10" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="multiplemonths">Multiple Months</label>
- <Calendar id="multiplemonths" v-model="date11" :numberOfMonths="3" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="datetemplate">Date Template</label>
- <Calendar id="datetemplate" v-model="date12">
- <template #date="slotProps">
- <strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</strong>
- <template v-else>{{slotProps.date.day}}}</template>
- </template>
- </Calendar>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <label for="touchUI">TouchUI</label>
- <Calendar id="touchUI" v-model="date13" :touchUI="true" />
- </div>
-</div>
-
-<h5>Inline</h5>
-<Calendar v-model="date14" :inline="true" :showWeek="true" />
-
-
-
-
-export default {
- created() {
- let today = new Date();
- let month = today.getMonth();
- let year = today.getFullYear();
- let prevMonth = (month === 0) ? 11 : month -1;
- let prevYear = (prevMonth === 11) ? year - 1 : year;
- let nextMonth = (month === 11) ? 0 : month + 1;
- let nextYear = (nextMonth === 0) ? year + 1 : year;
- this.minDate = new Date();
- this.minDate.setMonth(prevMonth);
- this.minDate.setFullYear(prevYear);
- this.maxDate = new Date();
- this.maxDate.setMonth(nextMonth);
- this.maxDate.setFullYear(nextYear);
-
- let invalidDate = new Date();
- invalidDate.setDate(today.getDate() - 1);
- this.invalidDates = [today,invalidDate];
- },
- data() {
- return {
- date1: null,
- date2: null,
- date3: null,
- date4: null,
- date5: null,
- date6: null,
- date7: null,
- date8: null,
- date9: null,
- date10: null,
- date11: null,
- date12: null,
- date13: null,
- date14: null,
- dates1: null,
- dates2: null,
- minDate: null,
- maxDate: null,
- invalidDates: null
- }
- }
-}
-
-
-
-
-.special-day {
- text-decoration: line-through;
-}
-
-
Dependencies
+ Import
+ Import
-
import CascadeSelect from 'primevue/cascadeselect';
Getting Started
- Getting Started
+
-
<CascadeSelect v-model="selectedCity" :options="countries" optionLabel="cname" optionGroupLabel="name"
@@ -106,8 +104,8 @@ data() {
Templating
- Templating
+
<CascadeSelect v-model="selectedCity" :options="countries" optionLabel="cname" optionGroupLabel="name"
@@ -125,360 +123,241 @@ data() {
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- any
- null
- Value of the component.
-
-
- options
- array
- null
- An array of selectitems to display as the available options.
-
-
- optionLabel
- string
- null
- Property name or getter function to use as the label of an option.
-
-
- optionValue
- string
- null
- Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
-
-
- optionGroupLabel
- string
- null
- Property name or getter function to use as the label of an option group.
-
-
- optionGroupChildren
- string
- null
- Property name or getter function to retrieve the items of a group.
-
-
- placeholder
- string
- null
- Default text to display when no option is selected.
-
-
- disabled
- boolean
- false
- When present, it specifies that the component should be disabled.
-
-
- dataKey
- string
- null
- A property to uniquely identify an option.
-
-
- tabindex
- number
- null
- Index of the element in tabbing order.
-
-
- inputId
- string
- null
- Identifier of the underlying input element.
-
-
- ariaLabelledBy
- string
- null
- Establishes relationships between the component and label(s) where its value should be one or more element IDs.
-
-
-
- appendTo
- string
- body
- A valid query selector or an HTMLElement to specify where the overlay gets attached.
-
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ any
+ null
+ Value of the component.
+
+
+ options
+ array
+ null
+ An array of selectitems to display as the available options.
+
+
+ optionLabel
+ string
+ null
+ Property name or getter function to use as the label of an option.
+
+
+ optionValue
+ string
+ null
+ Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
+
+
+ optionGroupLabel
+ string
+ null
+ Property name or getter function to use as the label of an option group.
+
+
+ optionGroupChildren
+ string
+ null
+ Property name or getter function to retrieve the items of a group.
+
+
+ placeholder
+ string
+ null
+ Default text to display when no option is selected.
+
+
+ disabled
+ boolean
+ false
+ When present, it specifies that the component should be disabled.
+
+
+ dataKey
+ string
+ null
+ A property to uniquely identify an option.
+
+
+ tabindex
+ number
+ null
+ Index of the element in tabbing order.
+
+
+ inputId
+ string
+ null
+ Identifier of the underlying input element.
+
+
+ ariaLabelledBy
+ string
+ null
+ Establishes relationships between the component and label(s) where its value should be one or more element IDs.
+
+
+
+ appendTo
+ string
+ body
+ A valid query selector or an HTMLElement to specify where the overlay gets attached.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- change
- event.originalEvent: Original event
-
- event.value: Selected option value Callback to invoke on value change.
-
-
- group-change
- event.originalEvent: Original event
-
- event.value: Selected option group Callback to invoke when a group changes.
-
-
- before-show
- -
- Callback to invoke before the overlay is shown.
-
-
- before-hide
- -
- Callback to invoke before the overlay is hidden.
-
-
- show
- -
- Callback to invoke when the overlay is shown.
-
-
-
- hide
- -
- Callback to invoke when the overlay is hidden.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ change
+ event.originalEvent: Original event
+
+ event.value: Selected option value Callback to invoke on value change.
+
+
+ group-change
+ event.originalEvent: Original event
+
+ event.value: Selected option group Callback to invoke when a group changes.
+
+
+ before-show
+ -
+ Callback to invoke before the overlay is shown.
+
+
+ before-hide
+ -
+ Callback to invoke before the overlay is hidden.
+
+
+ show
+ -
+ Callback to invoke when the overlay is shown.
+
+
+
+ hide
+ -
+ Callback to invoke when the overlay is hidden.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
-
- value
- value: Value of the component
-
- placeholder: Placeholder text to showSlots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+
+ value
+ value: Value of the component
+
+ placeholder: Placeholder text to showStyling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-cascadeselect
- Container element.
-
-
- p-cascadeselect-label
- Element to display label of selected option.
-
-
- p-cascadeselect-trigger
- Icon element.
-
-
- p-cascadeselect-panel
- Icon element.
-
-
- p-cascadeselect-items-wrapper
- Wrapper element of items list.
-
-
- p-cascadeselect-items
- List element of items.
-
-
-
- p-cascadeselect-item
- An item in the list.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-cascadeselect
+ Container element.
+
+
+ p-cascadeselect-label
+ Element to display label of selected option.
+
+
+ p-cascadeselect-trigger
+ Icon element.
+
+
+ p-cascadeselect-panel
+ Icon element.
+
+
+ p-cascadeselect-items-wrapper
+ Wrapper element of items list.
+
+
+ p-cascadeselect-items
+ List element of items.
+
+
+
+ p-cascadeselect-item
+ An item in the list.
+ Dependencies
-
-
-
-<h5>Basic</h5>
-<CascadeSelect v-model="selectedCity1" :options="countries" optionLabel="cname" optionGroupLabel="name"
- :optionGroupChildren="['states', 'cities']" style="minWidth: 14rem" placeholder="Select a City" />
-
-<h5>Templating</h5>
-<CascadeSelect v-model="selectedCity2" :options="countries" optionLabel="cname" optionGroupLabel="name"
- :optionGroupChildren="['states', 'cities']" style="minWidth: 14rem" placeholder="Select a City">
- <template #option="slotProps">
- <div class="country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" v-if="slotProps.option.states" />
- <i class="pi pi-compass p-mr-2" v-if="slotProps.option.cities"></i>
- <i class="pi pi-map-marker p-mr-2" v-if="slotProps.option.cname"></i>
- <span>{{slotProps.option.cname || slotProps.option.name}}</span>
- </div>
- </template>
-</CascadeSelect>
-
-
-
-export default {
- data() {
- return {
- selectedCity1: null,
- selectedCity2: null,
- countries: [
- {
- name: 'Australia',
- code: 'AU',
- states: [
- {
- name: 'New South Wales',
- cities: [
- {cname: 'Sydney', code: 'A-SY'},
- {cname: 'Newcastle', code: 'A-NE'},
- {cname: 'Wollongong', code: 'A-WO'}
- ]
- },
- {
- name: 'Queensland',
- cities: [
- {cname: 'Brisbane', code: 'A-BR'},
- {cname: 'Townsville', code: 'A-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'Canada',
- code: 'CA',
- states: [
- {
- name: 'Quebec',
- cities: [
- {cname: 'Montreal', code: 'C-MO'},
- {cname: 'Quebec City', code: 'C-QU'}
- ]
- },
- {
- name: 'Ontario',
- cities: [
- {cname: 'Ottawa', code: 'C-OT'},
- {cname: 'Toronto', code: 'C-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'United States',
- code: 'US',
- states: [
- {
- name: 'California',
- cities: [
- {cname: 'Los Angeles', code: 'US-LA'},
- {cname: 'San Diego', code: 'US-SD'},
- {cname: 'San Francisco', code: 'US-SF'}
- ]
- },
- {
- name: 'Florida',
- cities: [
- {cname: 'Jacksonville', code: 'US-JA'},
- {cname: 'Miami', code: 'US-MI'},
- {cname: 'Tampa', code: 'US-TA'},
- {cname: 'Orlando', code: 'US-OR'}
- ]
- },
- {
- name: 'Texas',
- cities: [
- {cname: 'Austin', code: 'US-AU'},
- {cname: 'Dallas', code: 'US-DA'},
- {cname: 'Houston', code: 'US-HO'}
- ]
- }
- ]
- }
- ]
- }
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import Checkbox from 'primevue/checkbox';
Getting Started
- Getting Started
+
-
<Checkbox v-model="checked" :binary="true" />
Multiple Values
- Multiple Values
+
-
<Checkbox name="city" value="Chicago" v-model="cities" />
<Checkbox name="city" value="Los Angeles" v-model="cities" />
@@ -36,182 +34,120 @@ export default {
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- value
- any
- null
- Value of the checkbox.
-
-
- modelValue
- any
- null
- Value binding of the checkbox.
-
-
-
- binary
- boolean
- false
- Allows to select a boolean value instead of multiple values.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ value
+ any
+ null
+ Value of the checkbox.
+
+
+ modelValue
+ any
+ null
+ Value binding of the checkbox.
+
+
+
+ binary
+ boolean
+ false
+ Allows to select a boolean value instead of multiple values.
+ Events
- Events
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-checkbox
- Container element
-
-
- p-checkbox-box
- Container of icon.
-
-
-
- p-checkbox-icon
- Icon element.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-checkbox
+ Container element
+
+
+ p-checkbox-box
+ Container of icon.
+
+
+
+ p-checkbox-icon
+ Icon element.
+ Dependencies
-
-
-
-<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-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>
-
-<h3>Dynamic Values, Preselection, Value Binding and Disabled Option</h3>
-<div v-for="category of categories" :key="category.key" class="p-field-checkbox">
- <Checkbox :id="category.key" name="category" :value="category" v-model="selectedCategories" :disabled="category.key === 'R'"/>
- <label :for="category.key">{{category.name}}</label>
-</div>
-
-
-
-export default {
- data() {
- return {
- checked: false,
- cities: [],
- categories: [{name: 'Accounting', key: 'A'}, {name: 'Marketing', key: 'M'}, {name: 'Production', key: 'P'}, {name: 'Research', key: 'R'}],
- selectedCategories: []
- }
- },
- created() {
- this.selectedCategories = this.categories.slice(1,3);
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import Chips from 'primevue/chips';
Getting Started
- Getting Started
+
-
<Chips v-model="value" />
Custom Content
- Custom Content
+
-
<Chips v-model="value">
<template #chip="slotProps">
@@ -29,208 +27,165 @@ import Chips from 'primevue/chips';
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- array
- null
- Value of the component.
-
-
- max
- number
- null
- Maximum number of entries allowed.
-
-
- separator
- string
- null
- Separator char to add an item when pressed in addition to the enter key. Currently only possible value is ","
-
-
- addOnBlur
- boolean
- false
- Whether to add an item when the input loses focus.
-
-
-
- allowDuplicate
- boolean
- true
- Whether to allow duplicate values or not.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ array
+ null
+ Value of the component.
+
+
+ max
+ number
+ null
+ Maximum number of entries allowed.
+
+
+ separator
+ string
+ null
+ Separator char to add an item when pressed in addition to the enter key. Currently only possible value is ","
+
+
+ addOnBlur
+ boolean
+ false
+ Whether to add an item when the input loses focus.
+
+
+
+ allowDuplicate
+ boolean
+ true
+ Whether to allow duplicate values or not.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- add
- originalEvent: Browser event
-
- value: Added item valueCallback to invoke when a chip is added.
-
-
-
- remove
- originalEvent: Browser event
-
- value: Removed item valueCallback to invoke when a chip is removed.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ add
+ originalEvent: Browser event
+
+ value: Added item valueCallback to invoke when a chip is added.
+
+
+
+ remove
+ originalEvent: Browser event
+
+ value: Removed item valueCallback to invoke when a chip is removed.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
-
- chip
- value: Value of the component
- Slots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+
+ chip
+ value: Value of the component
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-chips
- Container element
-
-
- p-chips-token
- Chip element container.
-
-
- p-chips-token-icon
- Icon of a chip.
-
-
- p-chips-token-label
- label of a chip.
-
-
-
- p-chips-input-token
- Container of input element.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-chips
+ Container element
+
+
+ p-chips-token
+ Chip element container.
+
+
+ p-chips-token-icon
+ Icon of a chip.
+
+
+ p-chips-token-label
+ label of a chip.
+
+
+
+ p-chips-input-token
+ Container of input element.
+ Dependencies
-
-
-
-<h5>Basic</h5>
-<Chips v-model="value1" />
-
-<h5>Comma Separator</h5>
-<Chips v-model="value2" separator="," />
-
-<h5>Template</h5>
-<Chips v-model="value3">
- <template #chip="slotProps">
- <div>
- <span>{{slotProps.value}} - (active) </span>
- <i class="pi pi-user-plus" style="font-size: 14px"></i>
- </div>
- </template>
-</Chips>
-
-
-
-export default {
- data() {
- return {
- value1: null,
- value2: null,
- value3: null
- }
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import ColorPicker from 'primevue/colorpicker';
Getting Started
- Getting Started
+
-
<ColorPicker v-model="color" />
@@ -26,192 +24,159 @@ export default {
Inline and Overlay
- Inline and Overlay
+
-
<ColorPicker v-model="color" :inline="true" />
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- any
- null
- Value of the component.
-
-
- defaultColor
- string
- ff0000
- Initial color to display when value is not defined.
-
-
- inline
- boolean
- false
- Whether to display as an overlay or not.
-
-
- format
- string
- hex
- Format to use in value binding, supported formats are "hex", "rgb" and "hsb".
-
-
- disabled
- boolean
- false
- When present, it specifies that the component should be disabled.
-
-
- tabindex
- string
- null
- Index of the element in tabbing order.
-
-
- baseZIndex
- number
- 0
- Base zIndex value to use in layering.
-
-
- autoZIndex
- boolean
- true
- Whether to automatically manage layering.
-
-
-
- ariaLabelledBy
- string
- null
- Establishes relationships between the component and label(s) where its value should be one or more element IDs.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ any
+ null
+ Value of the component.
+
+
+ defaultColor
+ string
+ ff0000
+ Initial color to display when value is not defined.
+
+
+ inline
+ boolean
+ false
+ Whether to display as an overlay or not.
+
+
+ format
+ string
+ hex
+ Format to use in value binding, supported formats are "hex", "rgb" and "hsb".
+
+
+ disabled
+ boolean
+ false
+ When present, it specifies that the component should be disabled.
+
+
+ tabindex
+ string
+ null
+ Index of the element in tabbing order.
+
+
+ baseZIndex
+ number
+ 0
+ Base zIndex value to use in layering.
+
+
+ autoZIndex
+ boolean
+ true
+ Whether to automatically manage layering.
+
+
+
+ ariaLabelledBy
+ string
+ null
+ Establishes relationships between the component and label(s) where its value should be one or more element IDs.
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-colorpicker
- Container element.
-
-
- p-colorpicker-overlay
- Container element in overlay mode.
-
-
- p-colorpicker-preview
- Preview input in overlay mode.
-
-
- p-colorpicker-panel
- Panel element of the colorpicker.
-
-
- p-colorpicker-content
- Wrapper that contains color and hue sections.
-
-
- p-colorpicker-color-selector
- Color selector container.
-
-
- p-colorpicker-color
- Color element.
-
-
- p-colorpicker-color-handle
- Handle of the color element.
-
-
- p-colorpicker-hue
- Hue slider.
-
-
-
- p-colorpicker-hue-handle
- Handle of the hue slider.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-colorpicker
+ Container element.
+
+
+ p-colorpicker-overlay
+ Container element in overlay mode.
+
+
+ p-colorpicker-preview
+ Preview input in overlay mode.
+
+
+ p-colorpicker-panel
+ Panel element of the colorpicker.
+
+
+ p-colorpicker-content
+ Wrapper that contains color and hue sections.
+
+
+ p-colorpicker-color-selector
+ Color selector container.
+
+
+ p-colorpicker-color
+ Color element.
+
+
+ p-colorpicker-color-handle
+ Handle of the color element.
+
+
+ p-colorpicker-hue
+ Hue slider.
+
+
+
+ p-colorpicker-hue-handle
+ Handle of the hue slider.
+ Dependencies
-
-
-
-<h3>Inline</h3>
-<ColorPicker v-model="color1" :inline="true" />
-
-<h3>Overlay</h3>
-<ColorPicker v-model="color2" />
-
-
-
-export default {
- data() {
- return {
- color1: null,
- color2: '1976D2'
- }
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import Dropdown from 'primevue/dropdown';
Getting Started
- Getting Started
+
-
<Dropdown v-model="selectedCity" :options="cities" optionLabel="name" placeholder="Select a City" />
@@ -31,11 +29,11 @@ data() {
Placeholder
- Placeholder
+ Grouping
- Grouping
+
-
export default {
data() {
@@ -80,19 +78,19 @@ export default {
Filtering
- Filtering
+
-
<Dropdown v-model="selectedCar" :options="cars" optionLabel="brand" placeholder="Select a Car" :filter="true" filterPlaceholder="Find Car"/>
Templating
- Templating
+
-
<Dropdown v-model="selectedCar" :options="cars" optionLabel="brand" :filter="true" placeholder="Select a Car" :showClear="true">
<template #value="slotProps">
@@ -114,507 +112,395 @@ export default {
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- any
- null
- Value of the component.
-
-
- options
- array
- null
- An array of selectitems to display as the available options.
-
-
- optionLabel
- string
- null
- Property name or getter function to use as the label of an option.
-
-
- optionValue
- string
- null
- Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
-
-
- optionDisabled
- boolean
- null
- Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
-
-
- optionGroupLabel
- string
- null
- Property name or getter function to use as the label of an option group.
-
-
- optionGroupChildren
- string
- null
- Property name or getter function that refers to the children options of option group.
-
-
- scrollHeight
- string
- 200px
- Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
-
-
- filter
- boolean
- false
- When specified, displays a filter input at header.
-
-
- filterPlaceholder
- string
- null
- Placeholder text to show when filter input is empty.
-
-
- filterLocale
- string
- undefined
- Locale to use in filtering. The default locale is the host environment's current locale.
-
-
- filterMatchMode
- string
- contains
- Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith"
-
-
- filterFields
- array
- null
- Fields used when filtering the options, defaults to optionLabel.
-
-
- editable
- boolean
- false
- When present, custom value instead of predefined options can be entered using the editable input field.
-
-
- placeholder
- string
- null
- Default text to display when no option is selected.
-
-
- disabled
- boolean
- false
- When present, it specifies that the component should be disabled.
-
-
- dataKey
- string
- null
- A property to uniquely identify an option.
-
-
- showClear
- boolean
- false
- When enabled, a clear icon is displayed to clear the value.
-
-
- tabindex
- number
- null
- Index of the element in tabbing order.
-
-
- inputId
- string
- null
- Identifier of the underlying input element.
-
-
- ariaLabelledBy
- string
- null
- Establishes relationships between the component and label(s) where its value should be one or more element IDs.
-
-
- appendTo
- string
- body
- A valid query selector or an HTMLElement to specify where the overlay gets attached.
-
-
- emptyFilterMessage
- string
- No results found
- Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration.
-
-
-
- emptyMessage
- string
- No results found
- Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ any
+ null
+ Value of the component.
+
+
+ options
+ array
+ null
+ An array of selectitems to display as the available options.
+
+
+ optionLabel
+ string
+ null
+ Property name or getter function to use as the label of an option.
+
+
+ optionValue
+ string
+ null
+ Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
+
+
+ optionDisabled
+ boolean
+ null
+ Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
+
+
+ optionGroupLabel
+ string
+ null
+ Property name or getter function to use as the label of an option group.
+
+
+ optionGroupChildren
+ string
+ null
+ Property name or getter function that refers to the children options of option group.
+
+
+ scrollHeight
+ string
+ 200px
+ Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
+
+
+ filter
+ boolean
+ false
+ When specified, displays a filter input at header.
+
+
+ filterPlaceholder
+ string
+ null
+ Placeholder text to show when filter input is empty.
+
+
+ filterLocale
+ string
+ undefined
+ Locale to use in filtering. The default locale is the host environment's current locale.
+
+
+ filterMatchMode
+ string
+ contains
+ Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith"
+
+
+ filterFields
+ array
+ null
+ Fields used when filtering the options, defaults to optionLabel.
+
+
+ editable
+ boolean
+ false
+ When present, custom value instead of predefined options can be entered using the editable input field.
+
+
+ placeholder
+ string
+ null
+ Default text to display when no option is selected.
+
+
+ disabled
+ boolean
+ false
+ When present, it specifies that the component should be disabled.
+
+
+ dataKey
+ string
+ null
+ A property to uniquely identify an option.
+
+
+ showClear
+ boolean
+ false
+ When enabled, a clear icon is displayed to clear the value.
+
+
+ tabindex
+ number
+ null
+ Index of the element in tabbing order.
+
+
+ inputId
+ string
+ null
+ Identifier of the underlying input element.
+
+
+ ariaLabelledBy
+ string
+ null
+ Establishes relationships between the component and label(s) where its value should be one or more element IDs.
+
+
+ appendTo
+ string
+ body
+ A valid query selector or an HTMLElement to specify where the overlay gets attached.
+
+
+ emptyFilterMessage
+ string
+ No results found
+ Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration.
+
+
+
+ emptyMessage
+ string
+ No results found
+ Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- change
- event.originalEvent: Original event
-
- event.value: Selected option value Callback to invoke on value change.
-
-
- input
- value: New value
- Callback to invoke on value change.
-
-
- before-show
- -
- Callback to invoke before the overlay is shown.
-
-
- before-hide
- -
- Callback to invoke before the overlay is hidden.
-
-
- show
- -
- Callback to invoke when the overlay is shown.
-
-
- hide
- -
- Callback to invoke when the overlay is hidden.
-
-
-
- filter
- event.originalEvent: Original event
-
- event.value: Filter value Callback to invoke on filter input.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ change
+ event.originalEvent: Original event
+
+ event.value: Selected option value Callback to invoke on value change.
+
+
+ input
+ value: New value
+ Callback to invoke on value change.
+
+
+ before-show
+ -
+ Callback to invoke before the overlay is shown.
+
+
+ before-hide
+ -
+ Callback to invoke before the overlay is hidden.
+
+
+ show
+ -
+ Callback to invoke when the overlay is shown.
+
+
+ hide
+ -
+ Callback to invoke when the overlay is hidden.
+
+
+
+ filter
+ event.originalEvent: Original event
+
+ event.value: Filter value Callback to invoke on filter input.
+ Methods
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- show
- -
- Shows the overlay.
-
-
-
- Hide
- -
- Hides the overlay.
- Methods
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ show
+ -
+ Shows the overlay.
+
+
+
+ Hide
+ -
+ Hides the overlay.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
- option
- option: Option instance
-
- index: Index of the option
-
- optiongroup
- option: OptionGroup instance
-
- index: Index of the option group
-
- value
- value: Value of the component
-
- placeholder: Placeholder prop value
-
- header
- value: Value of the component
-
- options: Displayed options
-
- footer
- value: Value of the component
-
- options: Displayed options
-
- emptyfilter
- -
-
-
-
- empty
- -
- Slots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+ option
+ option: Option instance
+
+ index: Index of the option
+
+ optiongroup
+ option: OptionGroup instance
+
+ index: Index of the option group
+
+ value
+ value: Value of the component
+
+ placeholder: Placeholder prop value
+
+ header
+ value: Value of the component
+
+ options: Displayed options
+
+ footer
+ value: Value of the component
+
+ options: Displayed options
+
+ emptyfilter
+ -
+
+
+
+ empty
+ -
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-dropdown
- Container element.
-
-
- p-dropdown-label
- Element to display label of selected option.
-
-
- p-dropdown-trigger
- Icon element.
-
-
- p-dropdown-panel
- Icon element.
-
-
- p-dropdown-items-wrapper
- Wrapper element of items list.
-
-
- p-dropdown-items
- List element of items.
-
-
- p-dropdown-item
- An item in the list.
-
-
- p-dropdown-filter-container
- Container of filter input.
-
-
- p-dropdown-filter
- Filter element.
-
-
-
- p-dropdown-open
- Container element when overlay is visible.
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-dropdown
+ Container element.
+
+
+ p-dropdown-label
+ Element to display label of selected option.
+
+
+ p-dropdown-trigger
+ Icon element.
+
+
+ p-dropdown-panel
+ Icon element.
+
+
+ p-dropdown-items-wrapper
+ Wrapper element of items list.
+
+
+ p-dropdown-items
+ List element of items.
+
+
+ p-dropdown-item
+ An item in the list.
+
+
+ p-dropdown-filter-container
+ Container of filter input.
+
+
+ p-dropdown-filter
+ Filter element.
+
+
+
+ p-dropdown-open
+ Container element when overlay is visible.
+ Dependencies
-
-
-
-<h5>Basic</h5>
-<Dropdown v-model="selectedCity1" :options="cities" optionLabel="name" optionValue="code" placeholder="Select a City" />
-
-<h5>Editable</h5>
-<Dropdown v-model="selectedCity2" :options="cities" optionLabel="name" :editable="true"/>
-
-<h5>Grouped</h5>
-<Dropdown v-model="selectedGroupedCity" :options="groupedCities" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items">
- <template #optiongroup="slotProps">
- <div class="p-d-flex p-ai-center country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" width="18" />
- <div>{{slotProps.option.label}}</div>
- </div>
- </template>
-</Dropdown>
-{{selectedGroupedCity}}
-
-<h5>Advanced with Templating, Filtering and Clear Icon</h5>
-<Dropdown v-model="selectedCountry" :options="countries" optionLabel="name" :filter="true" placeholder="Select a Country" :showClear="true">
- <template #value="slotProps">
- <div class="country-item country-item-value" v-if="slotProps.value">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.value.code.toLowerCase()" />
- <div>{{slotProps.value.name}}</div>
- </div>
- <span v-else>
- {{slotProps.placeholder}}
- </span>
- </template>
- <template #option="slotProps">
- <div class="country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" />
- <div>{{slotProps.option.name}}</div>
- </div>
- </template>
-</Dropdown>
-
-
-
-export default {
- data() {
- return {
- selectedCity1: null,
- selectedCity2: null,
- selectedCountry: null,
- selectedGroupedCity: null,
- cities: [
- {name: 'New York', code: 'NY'},
- {name: 'Rome', code: 'RM'},
- {name: 'London', code: 'LDN'},
- {name: 'Istanbul', code: 'IST'},
- {name: 'Paris', code: 'PRS'}
- ],
- countries: [
- {name: 'Australia', code: 'AU'},
- {name: 'Brazil', code: 'BR'},
- {name: 'China', code: 'CN'},
- {name: 'Egypt', code: 'EG'},
- {name: 'France', code: 'FR'},
- {name: 'Germany', code: 'DE'},
- {name: 'India', code: 'IN'},
- {name: 'Japan', code: 'JP'},
- {name: 'Spain', code: 'ES'},
- {name: 'United States', code: 'US'}
- ],
- groupedCities: [{
- label: 'Germany', code: 'DE',
- items: [
- {label: 'Berlin', value: 'Berlin'},
- {label: 'Frankfurt', value: 'Frankfurt'},
- {label: 'Hamburg', value: 'Hamburg'},
- {label: 'Munich', value: 'Munich'}
- ]
- },
- {
- label: 'USA', code: 'US',
- items: [
- {label: 'Chicago', value: 'Chicago'},
- {label: 'Los Angeles', value: 'Los Angeles'},
- {label: 'New York', value: 'New York'},
- {label: 'San Francisco', value: 'San Francisco'}
- ]
- },
- {
- label: 'Japan', code: 'JP',
- items: [
- {label: 'Kyoto', value: 'Kyoto'},
- {label: 'Osaka', value: 'Osaka'},
- {label: 'Tokyo', value: 'Tokyo'},
- {label: 'Yokohama', value: 'Yokohama'}
- ]
- }]
- }
- }
-}
-
-
Dependencies
+ Import
+ Import
-
import Editor from 'primevue/editor';
Getting Started
- Getting Started
+
-
<Editor v-model="value" editorStyle="height: 320px"/>
Toolbar
- Toolbar
+
-
<Editor v-model="value" editorStyle="height: 320px">
<template #toolbar>
@@ -30,202 +28,162 @@ import Editor from 'primevue/editor';
Properties
-
-
-
-
-
-
-
- Name
- Type
- Default
- Description
-
-
- modelValue
- string
- null
- Value of the content.
-
-
- placeholder
- string
- null
- Placeholder text to show when editor is empty.
-
-
- readonly
- boolean
- false
- Whether to instantiate the editor to readonly mode.
-
-
- formats
- string[]
- null
- Whitelist of formats to display, see here for available options.
-
-
-
- editorStyle
- any
- null
- Inline style of the container.
- Properties
+
+
+
+
+
+
+
+ Name
+ Type
+ Default
+ Description
+
+
+ modelValue
+ string
+ null
+ Value of the content.
+
+
+ placeholder
+ string
+ null
+ Placeholder text to show when editor is empty.
+
+
+ readonly
+ boolean
+ false
+ Whether to instantiate the editor to readonly mode.
+
+
+ formats
+ string[]
+ null
+ Whitelist of formats to display, see here for available options.
+
+
+
+ editorStyle
+ any
+ null
+ Inline style of the container.
+ Events
-
-
-
-
-
-
-
- Name
- Parameters
- Description
-
-
- text-change
- event.delta: Representation of the change.
-
- event.source: Source of change. Will be either "user" or "api".
- event.htmlValue: Current value as html.
- event.textValue: Current value as text.
- event.instance: Text editor instance.Callback to invoke when text of editor changes.
-
-
-
- input
- event: Current value as html.
- Callback to invoke when text of editor changes.
- Events
+
+
+
+
+
+
+
+ Name
+ Parameters
+ Description
+
+
+ text-change
+ event.delta: Representation of the change.
+
+ event.source: Source of change. Will be either "user" or "api".
+ event.htmlValue: Current value as html.
+ event.textValue: Current value as text.
+ event.instance: Text editor instance.Callback to invoke when text of editor changes.
+
+
+
+ input
+ event: Current value as html.
+ Callback to invoke when text of editor changes.
+ Slots
-
-
-
-
-
-
-
- Name
- Parameters
-
-
-
- toolbar
- -
- Slots
+
+
+
+
+
+
+
+ Name
+ Parameters
+
+
+
+ toolbar
+ -
+ Styling
-
-
-
-
-
-
-
- Name
- Element
-
-
- p-editor-container
- Container element
-
-
- p-editor-toolbar
- Toolbar of the editor
-
-
-
- p-editor-content
- Editable area
- Styling
+
+
+
+
+
+
+
+ Name
+ Element
+
+
+ p-editor-container
+ Container element
+
+
+ p-editor-toolbar
+ Toolbar of the editor
+
+
+
+ p-editor-content
+ Editable area
+ Dependencies
- Dependencies
+
-
npm install quill --save
-
-
-<h3>Default</h3>
-<Editor v-model="value1" editorStyle="height: 320px"/>
-
-<h3>Customized</h3>
-<Editor v-model="value2" editorStyle="height: 320px">
- <template #toolbar>
- <span class="ql-formats">
- <button class="ql-bold" v-tooltip.bottom="'Bold'"></button>
- <button class="ql-italic" v-tooltip.bottom="'Italic'"></button>
- <button class="ql-underline" v-tooltip.bottom="'Underline'"></button>
- </span>
- </template>
-</Editor>
-
-
-
-export default {
- data() {
- return {
- value1: '<div>Welcome to PrimeVue <b>Editor</b></div><div><br></div>',
- value2: ''
- }
- }
-}
-
-
-<div class="p-fluid p-grid">
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <InputText id="inputtext" type="text" v-model="value1" />
- <label for="inputtext">InputText</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label p-input-icon-left">
- <i class="pi pi-search" />
- <InputText id="inputtext-left" type="text" v-model="valueIconLeft" />
- <label for="inputtext-left">Left Icon</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label p-input-icon-right">
- <i class="pi pi-search" />
- <InputText id="inputtext-right" type="text" v-model="valueIconRight" />
- <label for="inputtext-right">Right Icon</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <AutoComplete v-model="value2" :suggestions="filteredCountries" @complete="searchCountry($event)" field="name" />
- <label for="autocomplete">AutoComplete</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <Calendar id="calendar" v-model="value3" />
- <label for="calendar">Calendar</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <Chips id="chips" v-model="value4" />
- <label for="chips">Chips</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <InputMask id="inputmask" v-model="value5" mask="99/99/9999" slotChar="mm/dd/yyyy" />
- <label for="inputmask">InputMask</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <InputNumber id="inputnumber" v-model="value6" />
- <label for="inputnumber">InputNumber</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">
- <i class="pi pi-user"></i>
- </span>
- <span class="p-float-label">
- <InputText id="inputgroup" type="text" v-model="value7" />
- <label for="inputgroup">InputGroup</label>
- </span>
- </div>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <CascadeSelect id="cascadeSelect" v-model="selectedCity" :options="cascadeCountries" optionLabel="cname" optionGroupLabel="name"
- :optionGroupChildren="['states', 'cities']" />
- <label for="multiselect">CascadeSelect</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <Dropdown id="dropdown" v-model="value8" :options="cities" optionLabel="name" />
- <label for="dropdown">Dropdown</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <MultiSelect id="multiselect" v-model="value9" :options="cities" optionLabel="name" />
- <label for="multiselect">MultiSelect</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <Textarea id="textarea" v-model="value10" rows="3" />
- <label for="textarea">Textarea</label>
- </span>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <span class="p-float-label">
- <Password id="password" v-model="value11" />
- <label for="password">Password</label>
- </span>
- </div>
-</div>
-</div>
-
-
-
-
-import CountryService from '../../service/CountryService';
-
-export default {
- data() {
- return {
- countries: null,
- filteredCountries: null,
- cities: [
- {name: 'New York', code: 'NY'},
- {name: 'Rome', code: 'RM'},
- {name: 'London', code: 'LDN'},
- {name: 'Istanbul', code: 'IST'},
- {name: 'Paris', code: 'PRS'}
- ],
- value1: null,
- value2: null,
- value3: null,
- value4: null,
- value5: null,
- value6: null,
- value7: null,
- value8: null,
- value9: null,
- value10: null,
- value11: null,
- selectedCity: null,
- cascadeCountries: [
- {
- name: 'Australia',
- code: 'AU',
- states: [
- {
- name: 'New South Wales',
- cities: [
- {cname: 'Sydney', code: 'A-SY'},
- {cname: 'Newcastle', code: 'A-NE'},
- {cname: 'Wollongong', code: 'A-WO'}
- ]
- },
- {
- name: 'Queensland',
- cities: [
- {cname: 'Brisbane', code: 'A-BR'},
- {cname: 'Townsville', code: 'A-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'Canada',
- code: 'CA',
- states: [
- {
- name: 'Quebec',
- cities: [
- {cname: 'Montreal', code: 'C-MO'},
- {cname: 'Quebec City', code: 'C-QU'}
- ]
- },
- {
- name: 'Ontario',
- cities: [
- {cname: 'Ottawa', code: 'C-OT'},
- {cname: 'Toronto', code: 'C-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'United States',
- code: 'US',
- states: [
- {
- name: 'California',
- cities: [
- {cname: 'Los Angeles', code: 'US-LA'},
- {cname: 'San Diego', code: 'US-SD'},
- {cname: 'San Francisco', code: 'US-SF'}
- ]
- },
- {
- name: 'Florida',
- cities: [
- {cname: 'Jacksonville', code: 'US-JA'},
- {cname: 'Miami', code: 'US-MI'},
- {cname: 'Tampa', code: 'US-TA'},
- {cname: 'Orlando', code: 'US-OR'}
- ]
- },
- {
- name: 'Texas',
- cities: [
- {cname: 'Austin', code: 'US-AU'},
- {cname: 'Dallas', code: 'US-DA'},
- {cname: 'Houston', code: 'US-HO'}
- ]
- }
- ]
- }
- ]
- }
- },
- countryService: null,
- created() {
- this.countryService = new CountryService();
- },
- mounted() {
- this.countryService.getCountries().then(data => this.countries = data);
- },
- methods: {
- searchCountry(event) {
- setTimeout(() => {
- if (!event.query.trim().length) {
- this.filteredCountries = [...this.countries];
- }
- else {
- this.filteredCountries = this.countries.filter((country) => {
- return country.name.toLowerCase().startsWith(event.query.toLowerCase());
- });
- }
- }, 250);
- }
- }
-}
-
-
-
-<h3>Addons</h3>
-<div class="p-grid p-fluid">
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">
- <i class="pi pi-user"></i>
- </span>
- <InputText placeholder="Username" />
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">$</span>
- <InputText placeholder="Price" />
- <span class="p-inputgroup-addon">.00</span>
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">W</span>
- <InputText placeholder="Website" />
- </div>
- </div>
-</div>
-
-<h3>Multiple Addons</h3>
-<div class="p-grid">
- <div class="p-col-12">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">
- <i class="pi pi-clock"></i>
- </span>
- <span class="p-inputgroup-addon">
- <i class="pi pi-star"></i>
- </span>
- <InputText placeholder="Price" />
- <span class="p-inputgroup-addon">$</span>
- <span class="p-inputgroup-addon">.00</span>
- </div>
- </div>
-</div>
-
-<h3>Button Addons</h3>
-<div class="p-grid p-fluid">
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <Button label="Search"/>
- <InputText placeholder="Keyword"/>
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <InputText placeholder="Keyword"/>
- <Button icon="pi pi-search" class="p-button-warning"/>
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <Button icon="pi pi-check" class="p-button-success"/>
- <InputText placeholder="Vote"/>
- <Button icon="pi pi-times" class="p-button-danger"/>
- </div>
- </div>
-</div>
-
-<h3>Checkbox and RadioButton</h3>
-<div class="p-grid p-fluid">
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">
- <Checkbox v-model="checked1" :binary="true" />
- </span>
- <InputText placeholder="Username"/>
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <InputText placeholder="Price"/>
- <span class="p-inputgroup-addon">
- <RadioButton name="rb1" value="rb1" v-model="radioValue1" />
- </span>
- </div>
- </div>
-
- <div class="p-col-12 p-md-4">
- <div class="p-inputgroup">
- <span class="p-inputgroup-addon">
- <Checkbox v-model="checked2" :binary="true" />
- </span>
- <InputText placeholder="Website"/>
- <span class="p-inputgroup-addon">
- <RadioButton name="rb2" value="rb2" v-model="radioValue2" />
- </span>
- </div>
- </div>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- checked1: false,
- checked2: false,
- radioValue1: '',
- radioValue2: ''
- }
- }
-}
-
-
-
import InputMask from 'primevue/inputmask';
- A model can be bound using the standard v-model directive.
+A model can be bound using the standard v-model directive.
<InputMask v-model="value" mask="99-999999" />
- Mask format can be a combination of the the following built-in definitions.
+Mask format can be a combination of the the following built-in definitions.
-
<InputMask v-model="value" mask="a*-999-a999" />
- Underscore is the default placeholder for a mask and this can be customized using slotChart option.
+Underscore is the default placeholder for a mask and this can be customized using slotChart option.
<InputMask v-model="value" mask="99/99/9999" slotChar="mm/dd/yyyy" />
- If the input does not complete the mask definition, it is cleared by default. - Use autoClear property to control this behavior. In addition, certain part of - a mask can be made optional by using ? symbol where anything after the question - mark becomes optional.
+If the input does not complete the mask definition, it is cleared by default. + Use autoClear property to control this behavior. In addition, certain part of + a mask can be made optional by using ? symbol where anything after the question + mark becomes optional.
<InputMask v-model="value" mask="(999) 999-9999? x99999" />
- InputText passes any valid attribute to the underlying input element. In addition;
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
mask | -string | -null | -Mask pattern. | -
slotChar | -string | -- | -Placeholder character in mask, default is underscore. | -
autoClear | -boolean | -true | -Clears the incomplete value on blur. | -
unmask | -boolean | -false | -Defines if model sets the raw unmasked value to bound value or the formatted mask value. | -
InputText passes any valid attribute to the underlying input element. In addition;
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
mask | +string | +null | +Mask pattern. | +
slotChar | +string | +- | +Placeholder character in mask, default is underscore. | +
autoClear | +boolean | +true | +Clears the incomplete value on blur. | +
unmask | +boolean | +false | +Defines if model sets the raw unmasked value to bound value or the formatted mask value. | +
Any valid event such as focus, blur and input are passed to the underlying input element.
+Any valid event such as focus, blur and input are passed to the underlying input element.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-inputmask p-inputtext | -Input element | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputmask p-inputtext | +Input element | +
None.
-
-<div class="p-fluid p-formgrid p-grid">
- <div class="p-field p-col-12 p-md-4">
- <label for="basic">Basic</label>
- <InputMask mask="99-999999" v-model="val1" placeholder="99-999999" />
- </div>
-
- <div class="p-field p-col-12 p-md-4">
- <label for="ssn">SSN</label>
- <InputMask mask="999-99-9999" v-model="val2" placeholder="999-99-9999" />
- </div>
-
- <div class="p-field p-col-12 p-md-4">
- <label for="date">Date</label>
- <InputMask mask="99/99/9999" v-model="val3" placeholder="99/99/9999" slotChar="mm/dd/yyyy" />
- </div>
-
- <div class="p-field p-col-12 p-md-4">
- <label for="Phone">Phone</label>
- <InputMask mask="(999) 999-9999" v-model="val4" placeholder="(999) 999-9999" />
- </div>
-
- <div class="p-field p-col-12 p-md-4">
- <label for="phoneext">Phone Ext</label>
- <InputMask mask="(999) 999-9999? x99999" v-model="val5" placeholder="(999) 999-9999? x99999"/>
- </div>
-
- <div class="p-field p-col-12 p-md-4">
- <label for="serial">Serial</label>
- <InputMask mask="a*-999-a999" v-model="val6" placeholder="a*-999-a999" />
- </div>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- val1: null,
- val2: null,
- val3: null,
- val4: null,
- val5: null,
- val6: null
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/inputnumber/InputNumberDoc.vue b/src/views/inputnumber/InputNumberDoc.vue index 59440a7c8..64bcc904e 100755 --- a/src/views/inputnumber/InputNumberDoc.vue +++ b/src/views/inputnumber/InputNumberDoc.vue @@ -1,36 +1,34 @@ -
import InputNumber from 'primevue/inputnumber';
InputNumber is used with the standard v-model directive. Component always provides a number type although formatting on the input is a string.
+InputNumber is used with the standard v-model directive. Component always provides a number type although formatting on the input is a string.
<InputNumber v-model="value" />
- Format is defined using the mode property, "decimal" is the default value allowing only integers when there is no other configuration.
+Format is defined using the mode property, "decimal" is the default value allowing only integers when there is no other configuration.
<InputNumber v-model="value" mode="decimal" />
- Fractions are configured with the minFractionDigits property. Optionally maxFractionDigits can be used to defined a boundary for the maximum digits.
+Fractions are configured with the minFractionDigits property. Optionally maxFractionDigits can be used to defined a boundary for the maximum digits.
<InputNumber v-model="value1" mode="decimal" :minFractionDigits="2" />
<InputNumber v-model="value2" mode="decimal" :minFractionDigits="2" :maxFractionDigits="2" />
- locale option is available to set the localization information such as grouping and decimal symbols where default value is the browser locale. Locales are defined per BCP Language Tag.
+locale option is available to set the localization information such as grouping and decimal symbols where default value is the browser locale. Locales are defined per BCP Language Tag.
User Locale
<InputNumber v-model="value1" mode="decimal" :minFractionDigits="2" />
@@ -46,9 +44,9 @@ Indian Locale
- Currency formatting is specified by setting the mode option to currency and currency property. In addition currencyDisplay option - allows how the currency is displayed, valid values are "symbol" (default) or "code".
+Currency formatting is specified by setting the mode option to currency and currency property. In addition currencyDisplay option + allows how the currency is displayed, valid values are "symbol" (default) or "code".
United States
<InputNumber v-model="value1" mode="currency" currency="USD" locale="en-US" />
@@ -64,8 +62,8 @@ Japan
- Custom texts e.g. units can be placed before or after the input section with the prefix and suffix properties.
+Custom texts e.g. units can be placed before or after the input section with the prefix and suffix properties.
Mile
<InputNumber v-model="value1" suffix=" mi" />
@@ -81,9 +79,9 @@ Temperature
- Spinner buttons is enabled using the showButtons options and layout is defined with the buttonLayout. Default value is "stacked" whereas - "horizontal" and "stacked" are alternatives. Note that even there are no buttons, up and down arrow keys can be used to spin the values with keyboard.
+Spinner buttons is enabled using the showButtons options and layout is defined with the buttonLayout. Default value is "stacked" whereas + "horizontal" and "stacked" are alternatives. Note that even there are no buttons, up and down arrow keys can be used to spin the values with keyboard.
Stacked
<InputNumber v-model="value1" showButtons mode="currency" currency="USD" />
@@ -98,519 +96,373 @@ Vertical
- Step factor is 1 by default and can be customized with step option.
+Step factor is 1 by default and can be customized with step option.
<InputNumber v-model="value" :step="0.25" />
- Value to be entered can be restricted by configuring the min and max options.
+Value to be entered can be restricted by configuring the min and max options.
<InputNumber v-model="value" :min="0" :max="100" />
- InputNumber passes any valid attribute to the underlying input element.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -number | -null | -Value of the component. | -
format | -boolean | -true | -Whether to format the value. | -
showButtons | -boolean | -false | -Displays spinner buttons. | -
buttonLayout | -string | -stacked | -Layout of the buttons, valid values are "stacked" (default), "horizontal" and "vertical". | -
incrementButtonClass | -string | -null | -Style class of the increment button. | -
decrementButtonClass | -string | -null | -Style class of the decrement button. | -
incrementButtonIcon | -string | -pi pi-angle-up | -Style class of the increment button. | -
decrementButtonIcon | -string | -pi pi-angle-down | -Style class of the decrement button. | -
locale | -string | -null | -Locale to be used in formatting. | -
localeMatcher | -string | -best fit | -The locale matching algorithm to use. Possible values are "lookup" and "best fit"; the default is "best fit". - See Locale Negotation for details. - | -
mode | -string | -decimal | -Defines the behavior of the component, valid values are "decimal" and "currency". | -
prefix | -string | -null | -Text to display before the value. | -
suffix | -string | -decimal | -Text to display after the value. | -
currency | -string | -null | -The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, - such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. - There is no default value; if the style is "currency", the currency property must be provided. | -
currencyDisplay | -string | -symbol | -How to display the currency in currency formatting. Possible values are "symbol" to use a localized currency symbol such as €, - "code" to use the ISO currency code, "name" to use a localized currency name such as "dollar"; the default is "symbol". | -
useGrouping | -boolean | -true | -Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. | -
minFractionDigits | -number | -null | -The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of - minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). | -
maxFractionDigits | -number | -null | -The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain - number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting - is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list - (2 if the list doesn't provide that information). | -
min | -number | -null | -Mininum boundary value. | -
max | -number | -null | -Maximum boundary value. | -
step | -number | -1 | -Step factor to increment/decrement the value. | -
inputStyle | -any | -null | -Inline style of the input field. | -
inputClass | -string | -null | -Style class of the input field. | -
InputNumber passes any valid attribute to the underlying input element.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +number | +null | +Value of the component. | +
format | +boolean | +true | +Whether to format the value. | +
showButtons | +boolean | +false | +Displays spinner buttons. | +
buttonLayout | +string | +stacked | +Layout of the buttons, valid values are "stacked" (default), "horizontal" and "vertical". | +
incrementButtonClass | +string | +null | +Style class of the increment button. | +
decrementButtonClass | +string | +null | +Style class of the decrement button. | +
incrementButtonIcon | +string | +pi pi-angle-up | +Style class of the increment button. | +
decrementButtonIcon | +string | +pi pi-angle-down | +Style class of the decrement button. | +
locale | +string | +null | +Locale to be used in formatting. | +
localeMatcher | +string | +best fit | +The locale matching algorithm to use. Possible values are "lookup" and "best fit"; the default is "best fit". + See Locale Negotation for details. + | +
mode | +string | +decimal | +Defines the behavior of the component, valid values are "decimal" and "currency". | +
prefix | +string | +null | +Text to display before the value. | +
suffix | +string | +decimal | +Text to display after the value. | +
currency | +string | +null | +The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, + such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. + There is no default value; if the style is "currency", the currency property must be provided. | +
currencyDisplay | +string | +symbol | +How to display the currency in currency formatting. Possible values are "symbol" to use a localized currency symbol such as €, + "code" to use the ISO currency code, "name" to use a localized currency name such as "dollar"; the default is "symbol". | +
useGrouping | +boolean | +true | +Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. | +
minFractionDigits | +number | +null | +The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of + minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). | +
maxFractionDigits | +number | +null | +The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain + number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting + is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list + (2 if the list doesn't provide that information). | +
min | +number | +null | +Mininum boundary value. | +
max | +number | +null | +Maximum boundary value. | +
step | +number | +1 | +Step factor to increment/decrement the value. | +
inputStyle | +any | +null | +Inline style of the input field. | +
inputClass | +string | +null | +Style class of the input field. | +
Any valid event such as focus and blur are passed to the underlying input element. Following are the additional events to configure the component.
-Name | -Parameters | -Description | -
---|---|---|
input | -event.originalEvent: Browser event - event.value: New value |
- Callback to invoke when the value is entered. | -
Any valid event such as focus and blur are passed to the underlying input element. Following are the additional events to configure the component.
+Name | +Parameters | +Description | +
---|---|---|
input | +event.originalEvent: Browser event + event.value: New value |
+ Callback to invoke when the value is entered. | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-inputnumber | -Container element | -
p-inputnumber-stacked | -Container element with stacked buttons. | -
p-inputnumber-horizontal | -Container element with horizontal buttons. | -
p-inputnumber-vertical | -Container element with vertical buttons. | -
p-inputnumber-input | -Input element | -
p-inputnumber-button | -Input element | -
p-inputnumber-button-up | -Increment button | -
p-inputnumber-button-down | -Decrement button | -
p-inputnumber-button-icon | -Button icon | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputnumber | +Container element | +
p-inputnumber-stacked | +Container element with stacked buttons. | +
p-inputnumber-horizontal | +Container element with horizontal buttons. | +
p-inputnumber-vertical | +Container element with vertical buttons. | +
p-inputnumber-input | +Input element | +
p-inputnumber-button | +Input element | +
p-inputnumber-button-up | +Increment button | +
p-inputnumber-button-down | +Decrement button | +
p-inputnumber-button-icon | +Button icon | +
None.
-
-<h3>Numerals</h3>
-<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-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-field p-col-12 p-md-3">
- <label for="minmaxfraction">Min-Max Fraction Digits</label>
- <InputNumber id="minmaxfraction" v-model="value3" mode="decimal" :minFractionDigits="2" :maxFractionDigits="5" />
- </div>
- <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-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-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-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-field p-col-12 p-md-3">
- <label for="locale-indian">Indian Locale</label>
- <InputNumber id="locale-indian" v-model="value8" mode="decimal" locale="en-IN" :minFractionDigits="2" />
- </div>
-</div>
-
-<h3>Currency</h3>
-<div class="p-grid p-fluid">
- <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-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-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-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-field p-col-12 p-md-3">
- <label for="mile">Mile</label>
- <InputNumber id="mile" v-model="value13" suffix=" mi" />
- </div>
- <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-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-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>
-
-<h5>Buttons</h5>
-<div class="p-grid p-fluid">
- <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-field p-col-12 p-md-3">
- <label for="horizontal">Horizontal with Step</label>
- <InputNumber id="horizontal" v-model="value18" showButtons buttonLayout="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-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 class="p-field p-col-12 p-md-3">
- <label for="vertical" style="display: block">Vertical</label>
- <InputNumber id="vertical" v-model="value19" mode="decimal" showButtons buttonLayout="vertical" style="width:4rem"
- decrementButtonClass="p-button-secondary" incrementButtonClass="p-button-secondary" incrementButtonIcon="pi pi-plus" decrementButtonIcon="pi pi-minus" />
-</div>
-
-
-
-
-export default {
- data() {
- return {
- value1: 42723,
- value2: 58151,
- value3: 2351.35,
- value4: 50,
- value5: 151351,
- value6: 115744,
- value7: 635524,
- value8: 732762,
- value9: 1500,
- value10: 2500,
- value11: 4250,
- value12: 5002,
- value13: 20,
- value14: 50,
- value15: 10,
- value16: 20,
- value17: 20,
- value18: 10.50,
- value19: 25,
- value20: 50
- }
- }
-}
-
-
- None.
+ diff --git a/src/views/inputswitch/InputSwitchDoc.vue b/src/views/inputswitch/InputSwitchDoc.vue index 4c72684e5..27b244b5a 100755 --- a/src/views/inputswitch/InputSwitchDoc.vue +++ b/src/views/inputswitch/InputSwitchDoc.vue @@ -1,15 +1,13 @@ -
import InputSwitch from 'primevue/inputswitch';
- Two-way binding to a boolean property is defined using the standard v-model directive.
+Two-way binding to a boolean property is defined using the standard v-model directive.
<InputSwitch v-model="checked" />
@@ -26,7 +24,7 @@ export default {
- As model is two-way binding enabled, setting the bound value as true displays the state as checked by default.
+As model is two-way binding enabled, setting the bound value as true displays the state as checked by default.
export default {
@@ -39,113 +37,79 @@ export default {
- Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -boolean | -null | -Specifies whether a inputswitch should be checked or not. | -
Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +boolean | +null | +Specifies whether a inputswitch should be checked or not. | +
Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component.
+Any valid event such as focus, blur and input are passed to the underlying input element. Following are the additional events to configure the component.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-inputswitch | -Container element. | -
p-inputswitch-checked | -Container element in active state. | -
p-inputswitch-slider | -Slider element behind the handle. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputswitch | +Container element. | +
p-inputswitch-checked | +Container element in active state. | +
p-inputswitch-slider | +Slider element behind the handle. | +
None.
-
-<h3>Basic</h3>
-<InputSwitch v-model="checked1" />
-
-<h3>Preselection</h3>
-<InputSwitch v-model="checked2" />
-
-
-
-
-export default {
- data() {
- return {
- checked1: false,
- checked2: true
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/inputtext/InputTextDoc.vue b/src/views/inputtext/InputTextDoc.vue index 8397dea9f..42587e39e 100755 --- a/src/views/inputtext/InputTextDoc.vue +++ b/src/views/inputtext/InputTextDoc.vue @@ -1,22 +1,20 @@ -
import InputText from 'primevue/inputtext';
- A model can be bound using the standard v-model directive.
+A model can be bound using the standard v-model directive.
<InputText type="text" v-model="value" />
- A floating label is implemented by wrapping the input and the label inside a container having .p-float-label style class.
+A floating label is implemented by wrapping the input and the label inside a container having .p-float-label style class.
<span class="p-float-label">
<InputText id="username" type="text" v-model="value" />
@@ -25,9 +23,9 @@ import InputText from 'primevue/inputtext';
- An icon can be integrated within an input field by wrapping the input and the icon with an element having p-input-icon-right - and p-input-icon-left classes depending on the icon location.
+An icon can be integrated within an input field by wrapping the input and the icon with an element having p-input-icon-right + and p-input-icon-left classes depending on the icon location.
<span class="p-input-icon-left">
<i class="pi pi-search" />
@@ -47,9 +45,9 @@ import InputText from 'primevue/inputtext';
- 2 more sizes are available in addition to a regular input, for a smaller input add p-inputtext-sm and for a larger one, use p-inputtext-lg.
- Note that these classes are mainly be used to change the size of a particular field, for global scaling see the
2 more sizes are available in addition to a regular input, for a smaller input add p-inputtext-sm and for a larger one, use p-inputtext-lg.
+ Note that these classes are mainly be used to change the size of a particular field, for global scaling see the
<InputText type="text" class="p-inputtext-sm" placeholder="Small" />
<InputText type="text" placeholder="Normal" />
@@ -57,8 +55,8 @@ import InputText from 'primevue/inputtext';
- Instead of repeating the scale classes for each input, sizing can also be applied to a group by adding the - class to a container element so that descendant inputs share the same style easier.
+Instead of repeating the scale classes for each input, sizing can also be applied to a group by adding the + class to a container element so that descendant inputs share the same style easier.
<div class="p-inputtext-sm">
<InputText />
@@ -68,10 +66,10 @@ import InputText from 'primevue/inputtext';
- Input fields come in two styles, default is outlined with borders around the field whereas filled alternative adds a background color - to the field. Applying p-input-filled to an ancestor of an input enables the filled style. If you prefer - to use filled inputs in the entire application, use a global container such as document body or the application element to apply the style class.
+Input fields come in two styles, default is outlined with borders around the field whereas filled alternative adds a background color + to the field. Applying p-input-filled to an ancestor of an input enables the filled style. If you prefer + to use filled inputs in the entire application, use a global container such as document body or the application element to apply the style class.
<div class="p-input-filled">
@@ -82,201 +80,123 @@ import InputText from 'primevue/inputtext';
- InputText passes any valid attribute to the underlying input element, additional attribute is the following.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
InputText passes any valid attribute to the underlying input element, additional attribute is the following.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
Any valid event such as focus, blur and input are passed to the underlying input element.
+Any valid event such as focus, blur and input are passed to the underlying input element.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-inputtext | -Input element | -
p-inputtext-sm | -Smaller input element | -
p-inputtext-lg | -Larger input element | -
p-inputtext-filled | -Filled input style. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputtext | +Input element | +
p-inputtext-sm | +Smaller input element | +
p-inputtext-lg | +Larger input element | +
p-inputtext-filled | +Filled input style. | +
None.
-
-<div class="card">
- <h5>Basic</h5>
- <InputText type="text" v-model="value1" />
- <span :style="{marginLeft: '.5em'}">{{value1}}</span>
-
- <h5>Floating Label</h5>
- <span class="p-float-label">
- <InputText id="username" type="text" v-model="value2" />
- <label for="username">Username</label>
- </span>
-
- <h5>Left Icon</h5>
- <span class="p-input-icon-left">
- <i class="pi pi-search" />
- <InputText type="text" v-model="value3" placeholder="Search" />
- </span>
-
- <h5>Right Icon</h5>
- <span class="p-input-icon-right">
- <i class="pi pi-spin pi-spinner" />
- <InputText type="text" v-model="value4" />
- </span>
-
- <h5>Help Text</h5>
- <div class="p-field">
- <label for="username1">Username</label>
- <InputText id="username1" type="username" aria-describedby="username1-help" />
- <small id="username1-help">Enter your username to reset your password.</small>
- </div>
-
- <h5>Invalid</h5>
- <div class="p-field">
- <label for="username2">Username</label>
- <InputText id="username2" type="username" aria-describedby="username2-help" class="p-invalid" />
- <small id="username2-help" class="p-error">Username is not available.</small>
- </div>
-
- <h5>Disabled</h5>
- <InputText type="text" v-model="value5" disabled />
-
- <h5>Sizes</h5>
- <div class="sizes">
- <InputText type="text" class="p-inputtext-sm" placeholder="Small" />
- <InputText type="text" placeholder="Normal" />
- <InputText type="text" class="p-inputtext-lg" placeholder="Large" />
- </div>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- value1: null,
- value2: null,
- value3: null,
- value4: null,
- value5: 'PrimeVue'
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/invalid/InvalidDemo.vue b/src/views/invalid/InvalidDemo.vue index 3db2e55e6..47d7494aa 100644 --- a/src/views/invalid/InvalidDemo.vue +++ b/src/views/invalid/InvalidDemo.vue @@ -49,189 +49,12 @@ -
-<div class="p-fluid p-grid">
- <div class="p-field p-col-12 p-md-4">
- <InputText id="inputtext" type="text" v-model="value1" placeholder="InputText" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <AutoComplete v-model="value2" :suggestions="filteredCountries" @complete="searchCountry($event)" field="name" placeholder="AutoComplete" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <Calendar id="calendar" v-model="value3" placeholder="Calendar" class="p-invalid" :showIcon="true" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <Chips id="chips" v-model="value4" placeholder="Chips" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <InputMask id="inputmask" v-model="value5" mask="99/99/9999" slotChar="mm/dd/yyyy" placeholder="InputMask" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <InputNumber id="inputnumber" v-model="value6" placeholder="InputNumber" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <CascadeSelect v-model="selectedCity" :options="cascadeCountries" optionLabel="cname" optionGroupLabel="name"
- :optionGroupChildren="['states', 'cities']" placeholder="CascadeSelect" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <Dropdown id="dropdown" v-model="value7" :options="cities" optionLabel="name" placeholder="Dropdown" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <MultiSelect id="multiselect" v-model="value8" :options="cities" optionLabel="name" placeholder="MultiSelect" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <Textarea id="textarea" v-model="value9" rows="3" placeholder="Textarea" class="p-invalid" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <Password id="password" v-model="value10" placeholder="Password" class="p-invalid" />
- </div>
-</div>
-
-
-
-
-import CountryService from '../../service/CountryService';
-
-export default {
- data() {
- return {
- countries: null,
- filteredCountries: null,
- cities: [
- {name: 'New York', code: 'NY'},
- {name: 'Rome', code: 'RM'},
- {name: 'London', code: 'LDN'},
- {name: 'Istanbul', code: 'IST'},
- {name: 'Paris', code: 'PRS'}
- ],
- value1: null,
- value2: null,
- value3: null,
- value4: null,
- value5: null,
- value6: null,
- value7: null,
- value8: null,
- value9: null,
- value10: null,
- selectedCity: null,
- cascadeCountries: [
- {
- name: 'Australia',
- code: 'AU',
- states: [
- {
- name: 'New South Wales',
- cities: [
- {cname: 'Sydney', code: 'A-SY'},
- {cname: 'Newcastle', code: 'A-NE'},
- {cname: 'Wollongong', code: 'A-WO'}
- ]
- },
- {
- name: 'Queensland',
- cities: [
- {cname: 'Brisbane', code: 'A-BR'},
- {cname: 'Townsville', code: 'A-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'Canada',
- code: 'CA',
- states: [
- {
- name: 'Quebec',
- cities: [
- {cname: 'Montreal', code: 'C-MO'},
- {cname: 'Quebec City', code: 'C-QU'}
- ]
- },
- {
- name: 'Ontario',
- cities: [
- {cname: 'Ottawa', code: 'C-OT'},
- {cname: 'Toronto', code: 'C-TO'}
- ]
- },
-
- ]
- },
- {
- name: 'United States',
- code: 'US',
- states: [
- {
- name: 'California',
- cities: [
- {cname: 'Los Angeles', code: 'US-LA'},
- {cname: 'San Diego', code: 'US-SD'},
- {cname: 'San Francisco', code: 'US-SF'}
- ]
- },
- {
- name: 'Florida',
- cities: [
- {cname: 'Jacksonville', code: 'US-JA'},
- {cname: 'Miami', code: 'US-MI'},
- {cname: 'Tampa', code: 'US-TA'},
- {cname: 'Orlando', code: 'US-OR'}
- ]
- },
- {
- name: 'Texas',
- cities: [
- {cname: 'Austin', code: 'US-AU'},
- {cname: 'Dallas', code: 'US-DA'},
- {cname: 'Houston', code: 'US-HO'}
- ]
- }
- ]
- }
- ]
- }
- },
- countryService: null,
- created() {
- this.countryService = new CountryService();
- },
- mounted() {
- this.countryService.getCountries().then(data => this.countries = data);
- },
- methods: {
- searchCountry(event) {
- setTimeout(() => {
- if (!event.query.trim().length) {
- this.filteredCountries = [...this.countries];
- }
- else {
- this.filteredCountries = this.countries.filter((country) => {
- return country.name.toLowerCase().startsWith(event.query.toLowerCase());
- });
- }
- }, 250);
- }
- }
-}
-
-
-
import Knob from 'primevue/knob';
- Knob is an input component and used with the standard v-model directive.
+Knob is an input component and used with the standard v-model directive.
<Knob v-model="value" />
@@ -23,306 +21,232 @@ data() {
- Boundaries are configured with the min and max values whose defaults are 0 and 100 respectively.
+Boundaries are configured with the min and max values whose defaults are 0 and 100 respectively.
<Knob v-model="value" :min="-50" :max="10" />
- Step factor is 1 by default and can be customized with step option.
+Step factor is 1 by default and can be customized with step option.
<Knob v-model="value" :step="10" />
- valueColor defines the value color, rangeColor defines the range background and similarly textColor configures the color of the value text. - In addition, strokeWidth is used to determine the width of the stroke of range and value sections.
+valueColor defines the value color, rangeColor defines the range background and similarly textColor configures the color of the value text. + In addition, strokeWidth is used to determine the width of the stroke of range and value sections.
<Knob v-model="value" valueColor="SlateGray" rangeColor="MediumTurquoise" />
- Default size of the Knob is 100 pixels for width and height, use the size property to customize it per your requirements.
+Default size of the Knob is 100 pixels for width and height, use the size property to customize it per your requirements.
<Knob v-model="value" :size="200" />
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -number | -null | -Value of the component. | -
size | -number | -100 | -Size of the component in pixels. | -
disabled | -boolean | -false | -When present, it specifies that the component should be disabled. | -
readonly | -boolean | -false | -When present, it specifies that the component value cannot be edited. | -
step | -number | -null | -Step factor to increment/decrement the value. | -
min | -number | -0 | -Mininum boundary value. | -
max | -number | -100 | -Maximum boundary value. | -
valueColor | -string | -null | -Background of the value. | -
rangeColor | -number | -null | -Background color of the range. | -
textColor | -number | -null | -Color of the value text. | -
strokeWidth | -number | -14 | -Width of the knob stroke. | -
showValue | -boolean | -true | -Whether the show the value inside the knob. | -
valueTemplate | -string | -{value} | -Template string of the value. | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +number | +null | +Value of the component. | +
size | +number | +100 | +Size of the component in pixels. | +
disabled | +boolean | +false | +When present, it specifies that the component should be disabled. | +
readonly | +boolean | +false | +When present, it specifies that the component value cannot be edited. | +
step | +number | +null | +Step factor to increment/decrement the value. | +
min | +number | +0 | +Mininum boundary value. | +
max | +number | +100 | +Maximum boundary value. | +
valueColor | +string | +null | +Background of the value. | +
rangeColor | +number | +null | +Background color of the range. | +
textColor | +number | +null | +Color of the value text. | +
strokeWidth | +number | +14 | +Width of the knob stroke. | +
showValue | +boolean | +true | +Whether the show the value inside the knob. | +
valueTemplate | +string | +{value} | +Template string of the value. | +
Name | -Parameters | -Description | -
---|---|---|
change | -value: New value | -Callback to invoke when the value changes. | -
Name | +Parameters | +Description | +
---|---|---|
change | +value: New value | +Callback to invoke when the value changes. | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-knob | -Container element. | -
p-knob-text | -Text element. | -
p-knob-value | -Value element. | -
p-knob-text | -Text element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-knob | +Container element. | +
p-knob-text | +Text element. | +
p-knob-value | +Value element. | +
p-knob-text | +Text element. | +
None.
-
-<div class="p-grid p-formgrid p-text-center">
- <div class="p-field p-col-12 p-md-4">
- <h5>Basic</h5>
- <Knob v-model="value1" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5>Readonly</h5>
- <Knob v-model="value2" readonly />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5>Disabled</h5>
- <Knob v-model="value3" disabled />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Min/Max</h5>
- <Knob v-model="value4" :min="-50" :max="50" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Step</h5>
- <Knob v-model="value5" :step="10" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Template</h5>
- <Knob v-model="value6" valueTemplate="{value}%" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Stroke</h5>
- <Knob v-model="value7" :strokeWidth="5" />
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Size</h5>
- <Knob v-model="value8" :size="200"/>
- </div>
- <div class="p-field p-col-12 p-md-4">
- <h5 class="p-mt-3">Color</h5>
- <Knob v-model="value9" valueColor="SlateGray" rangeColor="MediumTurquoise" />
- </div>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- value1: 0,
- value2: 50,
- value3: 75,
- value4: 10,
- value5: 40,
- value6: 60,
- value7: 40,
- value8: 60,
- value9: 50,
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/listbox/ListboxDoc.vue b/src/views/listbox/ListboxDoc.vue index 168bcf7ef..2dc09ba88 100755 --- a/src/views/listbox/ListboxDoc.vue +++ b/src/views/listbox/ListboxDoc.vue @@ -1,15 +1,13 @@ -
import Listbox from 'primevue/listbox';
- Listbox requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
+Listbox requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
<Listbox v-model="selectedCity" :options="cities" optionLabel="name" />
@@ -31,17 +29,17 @@ data() {
- Listbox allows selection of either single or multiple items. In single case, model should be a single object reference whereas in multiple case should be an array. Multiple items can either be selected - using metaKey or toggled individually depending on the value of metaKeySelection property value which is true by default. On touch enabled - devices metaKeySelection is turned off automatically.
+Listbox allows selection of either single or multiple items. In single case, model should be a single object reference whereas in multiple case should be an array. Multiple items can either be selected + using metaKey or toggled individually depending on the value of metaKeySelection property value which is true by default. On touch enabled + devices metaKeySelection is turned off automatically.
<Listbox v-model="selectedCity" :options="cities" optionLabel="name" :multiple="true"/>
- Options groups are specified with the optionGroupLabel and optionGroupChildren properties.
+Options groups are specified with the optionGroupLabel and optionGroupChildren properties.
export default {
data() {
@@ -86,18 +84,18 @@ export default {
- Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default, - optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available - to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith".
+Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default, + optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available + to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith".
<Listbox v-model="selectedCity" :options="cities" optionLabel="name" :filter="true"/>
- Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter. - In addition optiongroup, header, footer, emptyfilter and empty slots are provided for further customization.
+Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter. + In addition optiongroup, header, footer, emptyfilter and empty slots are provided for further customization.
<Listbox v-model="selectedCars" :options="cars" :multiple="true" :filter="true" optionLabel="brand" listStyle="max-height:250px" style="width:15em">
<template #option="slotProps">
@@ -110,377 +108,279 @@ export default {
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
options | -array | -null | -An array of selectitems to display as the available options. | -
optionLabel | -string | -null | -Property name or getter function to use as the label of an option. | -
optionValue | -string | -null | -Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | -
optionDisabled | -boolean | -null | -Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | -
optionGroupLabel | -string | -null | -Property name or getter function to use as the label of an option group. | -
optionGroupChildren | -string | -null | -Property name or getter function that refers to the children options of option group. | -
listStyle | -string | -null | -Inline style of inner list element. | -
disabled | -boolean | -false | -When specified, disables the component. | -
dataKey | -string | -false | -A property to uniquely identify an option. | -
multiple | -boolean | -false | -When specified, allows selecting multiple values. | -
metaKeySelection | -boolean | -true | -Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item - can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. | -
filter | -boolean | -false | -When specified, displays a filter input at header. | -
filterPlaceholder | -string | -null | -Placeholder text to show when filter input is empty. | -
filterLocale | -string | -undefined | -Locale to use in filtering. The default locale is the host environment's current locale. | -
filterMatchMode | -string | -contains | -Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith" | -
filterFields | -array | -null | -Fields used when filtering the options, defaults to optionLabel. | -
emptyFilterMessage | -string | -No results found | -Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | -
emptyMessage | -string | -No results found | -Text to display when there are no options available. Defaults to value from PrimeVue locale configuration. | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
options | +array | +null | +An array of selectitems to display as the available options. | +
optionLabel | +string | +null | +Property name or getter function to use as the label of an option. | +
optionValue | +string | +null | +Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | +
optionDisabled | +boolean | +null | +Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | +
optionGroupLabel | +string | +null | +Property name or getter function to use as the label of an option group. | +
optionGroupChildren | +string | +null | +Property name or getter function that refers to the children options of option group. | +
listStyle | +string | +null | +Inline style of inner list element. | +
disabled | +boolean | +false | +When specified, disables the component. | +
dataKey | +string | +false | +A property to uniquely identify an option. | +
multiple | +boolean | +false | +When specified, allows selecting multiple values. | +
metaKeySelection | +boolean | +true | +Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item + can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. | +
filter | +boolean | +false | +When specified, displays a filter input at header. | +
filterPlaceholder | +string | +null | +Placeholder text to show when filter input is empty. | +
filterLocale | +string | +undefined | +Locale to use in filtering. The default locale is the host environment's current locale. | +
filterMatchMode | +string | +contains | +Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith" | +
filterFields | +array | +null | +Fields used when filtering the options, defaults to optionLabel. | +
emptyFilterMessage | +string | +No results found | +Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | +
emptyMessage | +string | +No results found | +Text to display when there are no options available. Defaults to value from PrimeVue locale configuration. | +
Name | -Parameters | -Description | -
---|---|---|
change | -event.originalEvent: Original event - event.value: Selected option value |
- Callback to invoke on value change. | -
filter | -event.originalEvent: Original event - event.value: Filter value |
- Callback to invoke on filter input. | -
Name | +Parameters | +Description | +
---|---|---|
change | +event.originalEvent: Original event + event.value: Selected option value |
+ Callback to invoke on value change. | +
filter | +event.originalEvent: Original event + event.value: Filter value |
+ Callback to invoke on filter input. | +
Name | -Parameters | -
---|---|
option | -option: Option instance - index: Index of the option |
-
optiongroup | -option: OptionGroup instance - index: Index of the option group |
-
header | -value: Value of the component - options: Displayed options |
-
footer | -value: Value of the component - options: Displayed options |
-
emptyfilter | -- | -
empty | -- | -
Name | +Parameters | +
---|---|
option | +option: Option instance + index: Index of the option |
+
optiongroup | +option: OptionGroup instance + index: Index of the option group |
+
header | +value: Value of the component + options: Displayed options |
+
footer | +value: Value of the component + options: Displayed options |
+
emptyfilter | +- | +
empty | +- | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-listbox | -Main container element. | -
p-listbox-header | -Header element. | -
p-listbox-list-wrapper | -Container of list element. | -
p-listbox-list | -List element. | -
p-listbox-item | -An item in the list element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-listbox | +Main container element. | +
p-listbox-header | +Header element. | +
p-listbox-list-wrapper | +Container of list element. | +
p-listbox-list | +List element. | +
p-listbox-item | +An item in the list element. | +
None.
-
-<h5>Single</h5>
-<Listbox v-model="selectedCity" :options="cities" optionLabel="name" style="width:15rem" />
-
-<h5>Grouped</h5>
-<Listbox v-model="selectedGroupedCity" :options="groupedCities" optionLabel="label" style="width:15rem" optionGroupLabel="label" optionGroupChildren="items" listStyle="max-height:250px">
- <template #optiongroup="slotProps">
- <div class="p-d-flex p-ai-center country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" width="18" />
- <div>{{slotProps.option.label}}</div>
- </div>
- </template>
-</Listbox>
-
-<h5>Advanced with Templating, Filtering and Multiple Selection</h5>
-<Listbox v-model="selectedCountries" :options="countries" :multiple="true" :filter="true" optionLabel="name" listStyle="max-height:250px" style="width:15rem" filterPlaceholder="Search">
- <template #option="slotProps">
- <div class="country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" />
- <div>{{slotProps.option.name}}</div>
- </div>
- </template>
-</Listbox>
-
-
-
-
-export default {
- data() {
- return {
- selectedCity: null,
- selectedCountries: null,
- selectedGroupedCity: null,
- cities: [
- {name: 'New York', code: 'NY'},
- {name: 'Rome', code: 'RM'},
- {name: 'London', code: 'LDN'},
- {name: 'Istanbul', code: 'IST'},
- {name: 'Paris', code: 'PRS'}
- ],
- countries: [
- {name: 'Australia', code: 'AU'},
- {name: 'Brazil', code: 'BR'},
- {name: 'China', code: 'CN'},
- {name: 'Egypt', code: 'EG'},
- {name: 'France', code: 'FR'},
- {name: 'Germany', code: 'DE'},
- {name: 'India', code: 'IN'},
- {name: 'Japan', code: 'JP'},
- {name: 'Spain', code: 'ES'},
- {name: 'United States', code: 'US'}
- ],
- groupedCities: [{
- label: 'Germany', code: 'DE',
- items: [
- {label: 'Berlin', value: 'Berlin'},
- {label: 'Frankfurt', value: 'Frankfurt'},
- {label: 'Hamburg', value: 'Hamburg'},
- {label: 'Munich', value: 'Munich'}
- ]
- },
- {
- label: 'USA', code: 'US',
- items: [
- {label: 'Chicago', value: 'Chicago'},
- {label: 'Los Angeles', value: 'Los Angeles'},
- {label: 'New York', value: 'New York'},
- {label: 'San Francisco', value: 'San Francisco'}
- ]
- },
- {
- label: 'Japan', code: 'JP',
- items: [
- {label: 'Kyoto', value: 'Kyoto'},
- {label: 'Osaka', value: 'Osaka'},
- {label: 'Tokyo', value: 'Tokyo'},
- {label: 'Yokohama', value: 'Yokohama'}
- ]
- }]
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/multiselect/MultiSelectDoc.vue b/src/views/multiselect/MultiSelectDoc.vue index 815cfc28d..3c0c8f7d4 100755 --- a/src/views/multiselect/MultiSelectDoc.vue +++ b/src/views/multiselect/MultiSelectDoc.vue @@ -1,15 +1,13 @@ -
import MultiSelect from 'primevue/multiselect';
- MultiSelect requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
+MultiSelect requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
<MultiSelect v-model="selectedCars" :options="cars" optionLabel="brand" placeholder="Select Brands" />
@@ -35,15 +33,15 @@ data() {
- A comma separated list is used by default to display selected items whereas alternative chip mode is provided using the display property to visualize the items as tokens.
+A comma separated list is used by default to display selected items whereas alternative chip mode is provided using the display property to visualize the items as tokens.
<MultiSelect v-model="selectedCars" :options="cars" optionLabel="brand" placeholder="Select Brands" display="chip"/>
- Options groups are specified with the optionGroupLabel and optionGroupChildren properties.
+Options groups are specified with the optionGroupLabel and optionGroupChildren properties.
export default {
data() {
@@ -88,19 +86,19 @@ export default {
- Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default, - optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available - to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith".
+Filtering allows searching items in the list using an input field at the header. In order to use filtering, enable filter property. By default, + optionLabel is used when searching and filterFields can be used to customize the fields being utilized. Furthermore, filterMatchMode is available + to define the search algorithm. Valid values are "contains" (default), "startsWith" and "endsWith".
<MultiSelect v-model="selectedCars" :options="cars" :filter="true" optionLabel="brand" placeholder="Select Brands"/>
- Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter. - In addition value, optiongroup, header, footer, emptyfilter and empty slots are provided for further customization.
+Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter. + In addition value, optiongroup, header, footer, emptyfilter and empty slots are provided for further customization.
<MultiSelect v-model="selectedCars2" :options="cars" optionLabel="brand" placeholder="Select a Car">
<template #value="slotProps">
@@ -122,515 +120,376 @@ export default {
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
options | -array | -null | -An array of selectitems to display as the available options. | -
optionLabel | -string | -null | -Property name or getter function to use as the label of an option. | -
optionValue | -string | -null | -Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | -
optionDisabled | -boolean | -null | -Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | -
optionGroupLabel | -string | -null | -Property name or getter function to use as the label of an option group. | -
optionGroupChildren | -string | -null | -Property name or getter function that refers to the children options of option group. | -
scrollHeight | -string | -200px | -Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. | -
filter | -boolean | -false | -When specified, displays a filter input at header. | -
filterPlaceholder | -string | -null | -Placeholder text to show when filter input is empty. | -
filterLocale | -string | -undefined | -Locale to use in filtering. The default locale is the host environment's current locale. | -
filterMatchMode | -string | -contains | -Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith" | -
filterFields | -array | -null | -Fields used when filtering the options, defaults to optionLabel. | -
placeholder | -string | -null | -Label to display when there are no selections. | -
disabled | -boolean | -false | -When present, it specifies that the component should be disabled. | -
tabindex | -string | -null | -Index of the element in tabbing order. | -
inputId | -string | -null | -Identifier of the underlying input element. | -
dataKey | -string | -null | -A property to uniquely identify an option. | -
ariaLabelledBy | -string | -null | -Establishes relationships between the component and label(s) where its value should be one or more element IDs. | -
appendTo | -string | -body | -A valid query selector or an HTMLElement to specify where the overlay gets attached. | -
emptyFilterMessage | -string | -No results found | -Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | -
emptyMessage | -string | -No results found | -Text to display when there are no options available. Defaults to value from PrimeVue locale configuration. | -
display | -string | -comma | -Defines how the selected items are displayed, valid values are "comma" and "chip". | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
options | +array | +null | +An array of selectitems to display as the available options. | +
optionLabel | +string | +null | +Property name or getter function to use as the label of an option. | +
optionValue | +string | +null | +Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | +
optionDisabled | +boolean | +null | +Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | +
optionGroupLabel | +string | +null | +Property name or getter function to use as the label of an option group. | +
optionGroupChildren | +string | +null | +Property name or getter function that refers to the children options of option group. | +
scrollHeight | +string | +200px | +Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. | +
filter | +boolean | +false | +When specified, displays a filter input at header. | +
filterPlaceholder | +string | +null | +Placeholder text to show when filter input is empty. | +
filterLocale | +string | +undefined | +Locale to use in filtering. The default locale is the host environment's current locale. | +
filterMatchMode | +string | +contains | +Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith" | +
filterFields | +array | +null | +Fields used when filtering the options, defaults to optionLabel. | +
placeholder | +string | +null | +Label to display when there are no selections. | +
disabled | +boolean | +false | +When present, it specifies that the component should be disabled. | +
tabindex | +string | +null | +Index of the element in tabbing order. | +
inputId | +string | +null | +Identifier of the underlying input element. | +
dataKey | +string | +null | +A property to uniquely identify an option. | +
ariaLabelledBy | +string | +null | +Establishes relationships between the component and label(s) where its value should be one or more element IDs. | +
appendTo | +string | +body | +A valid query selector or an HTMLElement to specify where the overlay gets attached. | +
emptyFilterMessage | +string | +No results found | +Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | +
emptyMessage | +string | +No results found | +Text to display when there are no options available. Defaults to value from PrimeVue locale configuration. | +
display | +string | +comma | +Defines how the selected items are displayed, valid values are "comma" and "chip". | +
Name | -Parameters | -Description | -
---|---|---|
change | -event.originalEvent: Original event - event.value: Selected option value |
- Callback to invoke on value change. | -
before-show | -- | -Callback to invoke before the overlay is shown. | -
before-hide | -- | -Callback to invoke before the overlay is hidden. | -
show | -- | -Callback to invoke when the overlay is shown. | -
hide | -- | -Callback to invoke when the overlay is hidden. | -
filter | -event.originalEvent: Original event - event.value: Filter value |
- Callback to invoke on filter input. | -
Name | +Parameters | +Description | +
---|---|---|
change | +event.originalEvent: Original event + event.value: Selected option value |
+ Callback to invoke on value change. | +
before-show | +- | +Callback to invoke before the overlay is shown. | +
before-hide | +- | +Callback to invoke before the overlay is hidden. | +
show | +- | +Callback to invoke when the overlay is shown. | +
hide | +- | +Callback to invoke when the overlay is hidden. | +
filter | +event.originalEvent: Original event + event.value: Filter value |
+ Callback to invoke on filter input. | +
Name | -Parameters | -Description | -
---|---|---|
show | -- | -Shows the overlay. | -
Hide | -- | -Hides the overlay. | -
Name | +Parameters | +Description | +
---|---|---|
show | +- | +Shows the overlay. | +
Hide | +- | +Hides the overlay. | +
Name | -Parameters | -
---|---|
option | -option: Option instance - index: Index of the option |
-
optiongroup | -option: OptionGroup instance - index: Index of the option group |
-
value | -value: Value of the component - placeholder: Placeholder prop value |
-
header | -value: Value of the component - options: Displayed options |
-
footer | -value: Value of the component - options: Displayed options |
-
emptyfilter | -- | -
empty | -- | -
Name | +Parameters | +
---|---|
option | +option: Option instance + index: Index of the option |
+
optiongroup | +option: OptionGroup instance + index: Index of the option group |
+
value | +value: Value of the component + placeholder: Placeholder prop value |
+
header | +value: Value of the component + options: Displayed options |
+
footer | +value: Value of the component + options: Displayed options |
+
emptyfilter | +- | +
empty | +- | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-multiselect | -Container element. | -
p-multiselect-label-container | -Container of the label to display selected items. | -
p-multiselect-label-container | -Label to display selected items. | -
p-multiselect-trigger | -Dropdown button. | -
p-multiselect-filter-container | -Container of filter input. | -
p-multiselect-panel | -Overlay panel for items. | -
p-multiselect-items | -List container of items. | -
p-multiselect-item | -An item in the list. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-multiselect | +Container element. | +
p-multiselect-label-container | +Container of the label to display selected items. | +
p-multiselect-label-container | +Label to display selected items. | +
p-multiselect-trigger | +Dropdown button. | +
p-multiselect-filter-container | +Container of filter input. | +
p-multiselect-panel | +Overlay panel for items. | +
p-multiselect-items | +List container of items. | +
p-multiselect-item | +An item in the list. | +
None.
-
-<h5>Basic</h5>
-<MultiSelect v-model="selectedCities1" :options="cities" optionLabel="name" placeholder="Select Cities" />
-
-<h5>Chips</h5>
-<MultiSelect v-model="selectedCities2" :options="cities" optionLabel="name" placeholder="Select Cities" display="chip" />
-
-<h5>Grouped</h5>
-<MultiSelect v-model="selectedGroupedCities" :options="groupedCities" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Select Cities">
- <template #optiongroup="slotProps">
- <div class="p-d-flex p-ai-center country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" width="18" />
- <div>{{slotProps.option.label}}</div>
- </div>
- </template>
-</MultiSelect>
-
-<h5>Advanced with Templating and Filtering</h5>
-<MultiSelect v-model="selectedCountries" :options="countries" optionLabel="name" placeholder="Select Countries" :filter="true" class="multiselect-custom">
- <template #value="slotProps">
- <div class="country-item country-item-value" v-for="option of slotProps.value" :key="option.code">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + option.code.toLowerCase()" />
- <div>{{option.name}}</div>
- </div>
- <template v-if="!slotProps.value || slotProps.value.length === 0">
- Select Countries
- </template>
- </template>
- <template #option="slotProps">
- <div class="country-item">
- <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + slotProps.option.code.toLowerCase()" />
- <div>{{slotProps.option.name}}</div>
- </div>
- </template>
-</MultiSelect>
-
-
-
-
-export default {
- data() {
- return {
- selectedCities1: null,
- selectedCities2: null,
- selectedCountries: null,
- selectedGroupedCities: null,
- cities: [
- {name: 'New York', code: 'NY'},
- {name: 'Rome', code: 'RM'},
- {name: 'London', code: 'LDN'},
- {name: 'Istanbul', code: 'IST'},
- {name: 'Paris', code: 'PRS'}
- ],
- countries: [
- {name: 'Australia', code: 'AU'},
- {name: 'Brazil', code: 'BR'},
- {name: 'China', code: 'CN'},
- {name: 'Egypt', code: 'EG'},
- {name: 'France', code: 'FR'},
- {name: 'Germany', code: 'DE'},
- {name: 'India', code: 'IN'},
- {name: 'Japan', code: 'JP'},
- {name: 'Spain', code: 'ES'},
- {name: 'United States', code: 'US'}
- ],
- groupedCities: [{
- label: 'Germany', code: 'DE',
- items: [
- {label: 'Berlin', value: 'Berlin'},
- {label: 'Frankfurt', value: 'Frankfurt'},
- {label: 'Hamburg', value: 'Hamburg'},
- {label: 'Munich', value: 'Munich'}
- ]
- },
- {
- label: 'USA', code: 'US',
- items: [
- {label: 'Chicago', value: 'Chicago'},
- {label: 'Los Angeles', value: 'Los Angeles'},
- {label: 'New York', value: 'New York'},
- {label: 'San Francisco', value: 'San Francisco'}
- ]
- },
- {
- label: 'Japan', code: 'JP',
- items: [
- {label: 'Kyoto', value: 'Kyoto'},
- {label: 'Osaka', value: 'Osaka'},
- {label: 'Tokyo', value: 'Tokyo'},
- {label: 'Yokohama', value: 'Yokohama'}
- ]
- }]
- }
- }
-}
-
-
-
-
-.p-multiselect {
- min-width: 15rem;
-}
-
-::v-deep(.multiselect-custom) {
- .p-multiselect-label:not(.p-placeholder) {
- padding-top: .25rem;
- padding-bottom: .25rem;
- }
-
- .country-item-value {
- padding: .25rem .5rem;
- border-radius: 3px;
- display: inline-flex;
- margin-right: .5rem;
- background-color: var(--primary-color);
- color: var(--primary-color-text);
-
- img.flag {
- width: 17px;
- }
- }
-}
-
-
- None.
+ diff --git a/src/views/password/PasswordDoc.vue b/src/views/password/PasswordDoc.vue index 62281d5c7..31646baf4 100755 --- a/src/views/password/PasswordDoc.vue +++ b/src/views/password/PasswordDoc.vue @@ -1,305 +1,247 @@ -
import Password from 'primevue/password';
- A model can be bound using the standard v-model directive.
+A model can be bound using the standard v-model directive.
<Password v-model="value" />
- Password component uses regular expressions for middle and strong passwords with the following defaults.
+Password component uses regular expressions for middle and strong passwords with the following defaults.
-^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,}).
-^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,}).
+^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})
-^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})
+It is possible to define your own checks with the mediumRegex and strongRegex properties.
+ +3 slots are included to customize the overlay. These are header, content and footer. Note that content overrides the default meter.
+
+<Password v-model="value4">
+ <template #header>
+ <h6>Pick a password</h6>
+ </template>
+ <template #footer>
+ <Divider />
+ <p class="p-mt-2">Suggestions</p>
+ <ul class="p-pl-2 p-ml-2 p-mt-0" style="line-height: 1.5">
+ <li>At least one lowercase</li>
+ <li>At least one uppercase</li>
+ <li>At least one numeric</li>
+ <li>Minimum 8 characters</li>
+ </ul>
+ </template>
+</Password>
+
+
+
+ Any property such as name and placeholder are passed to the underlying input element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
promptLabel | +string | +null | +Text to prompt password entry. Defaults to PrimeVue |
+
mediumRegex | +string | +Regex for a medium level password. | +^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,}). | +
strongRegex | +string | +Regex for a strong level password. | +^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,}) | +
weakLabel | +string | +null | +Text for a weak password. Defaults to PrimeVue |
+
mediumLabel | +string | +null | +Text for a medium password. Defaults to PrimeVue |
+
strongLabel | +string | +null | +Text for a strong password. Defaults to PrimeVue |
+
feedback | +boolean | +true | +Whether to show the strength indicator or not. | +
toggleMask | +boolean | +false | +Whether to show an icon to display the password as plain text. | +
appendTo | +string | +body | +A valid query selector or an HTMLElement to specify where the overlay gets attached. | +
inputStyle | +any | +null | +Inline style of the input field. | +
inputClass | +string | +null | +Style class of the input field. | +
Any valid event such as focus, blur and input are passed to the underlying input element.
+ +Name | +Parameters | +
---|---|
header | +- | +
content | +- | +
footer | +- | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-password-panel | +Container of password panel | +
p-password-meter | +Meter element of password strength | +
p-password-info | +Text to display strength | +
None.
+
import RadioButton from 'primevue/radiobutton';
- Two-way value binding is defined using the standard v-model directive.
+Two-way value binding is defined using the standard v-model directive.
<RadioButton name="city" value="Chicago" v-model="city" />
<RadioButton name="city" value="Los Angeles" v-model="city" />
@@ -37,162 +35,106 @@ export default {
- Any property such as name and autofocus are passed to the underlying input element. Following is the additional property to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
value | -any | -null | -Value of the checkbox. | -
modelValue | -any | -null | -Value binding of the checkbox. | -
Any property such as name and autofocus are passed to the underlying input element. Following is the additional property to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
value | +any | +null | +Value of the checkbox. | +
modelValue | +any | +null | +Value binding of the checkbox. | +
Any valid event such as focus and blur.
+Any valid event such as focus and blur.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-radiobutton | -Container element | -
p-radiobutton-box | -Container of icon. | -
p-radiobutton-icon | -Icon element. | -
p-radiobutton-label | -Label element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-radiobutton | +Container element | +
p-radiobutton-box | +Container of icon. | +
p-radiobutton-icon | +Icon element. | +
p-radiobutton-label | +Label element. | +
None.
-
-<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>
-
-<h5>Dynamic Values, Preselection, Value Binding and Disabled Option</h5>
-<div v-for="category of categories" :key="category.key" class="p-field-radiobutton">
- <RadioButton :id="category.key" name="category" :value="category" v-model="selectedCategory" :disabled="category.key === 'R'" />
- <label :for="category.key">{{category.name}}</label>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- city: null,
- categories: [{name: 'Accounting', key: 'A'}, {name: 'Marketing', key: 'M'}, {name: 'Production', key: 'P'}, {name: 'Research', key: 'R'}],
- selectedCategory: null
- }
- },
- created() {
- this.selectedCategory = this.categories[1];
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/rating/RatingDoc.vue b/src/views/rating/RatingDoc.vue index f5ea8af8d..76859792e 100755 --- a/src/views/rating/RatingDoc.vue +++ b/src/views/rating/RatingDoc.vue @@ -1,199 +1,157 @@ -
import Rating from 'primevue/rating';
- Two-way value binding is defined using v-model.
+Two-way value binding is defined using v-model.
<Rating v-model="val" />
- Number of stars to display is defined with stars property, default is 5.
+Number of stars to display is defined with stars property, default is 5.
<Rating v-model="val" :stars="7"/>
- A cancel icon is displayed to reset the value by default, set cancel as false to remove this option.
+A cancel icon is displayed to reset the value by default, set cancel as false to remove this option.
<Rating v-model="val" :cancel="false" />
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -number | -null | -Value of the rating. | -
disabled | -boolean | -false | -When present, it specifies that the element should be disabled. | -
readonly | -boolean | -false | -When present, it specifies that component is read-only. | -
stars | -number | -5 | -Number of stars. | -
cancel | -boolean | -true | -When specified a cancel icon is displayed to allow clearing the value. | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +number | +null | +Value of the rating. | +
disabled | +boolean | +false | +When present, it specifies that the element should be disabled. | +
readonly | +boolean | +false | +When present, it specifies that component is read-only. | +
stars | +number | +5 | +Number of stars. | +
cancel | +boolean | +true | +When specified a cancel icon is displayed to allow clearing the value. | +
Name | -Parameters | -Description | -
---|---|---|
change | -event.originalEvent: Original event - event.value: Selected option value |
- Callback to invoke on value change. | -
Name | +Parameters | +Description | +
---|---|---|
change | +event.originalEvent: Original event + event.value: Selected option value |
+ Callback to invoke on value change. | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-rating | -Container element | -
p-rating-star | -Star element | -
p-rating-star-on | -Selected star element. | -
p-rating-cancel | -Cancel icon. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-rating | +Container element | +
p-rating-star | +Star element | +
p-rating-star-on | +Selected star element. | +
p-rating-cancel | +Cancel icon. | +
None.
-
-<h3>Basic {{val1}}</h3>
-<Rating v-model="val1" />
-
-<h3>Without Cancel</h3>
-<Rating v-model="val2" :cancel="false" />
-
-<h3>ReadOnly</h3>
-<Rating :modelValue="5" :readonly="true" :stars="10" :cancel="false" />
-
-<h3>Disabled</h3>
-<Rating :modelValue="8" :disabled="true" :stars="10" />
-
-
-
-
-export default {
- data() {
- return {
- val1: null,
- val2: 3,
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/selectbutton/SelectButtonDoc.vue b/src/views/selectbutton/SelectButtonDoc.vue index e9bdf3583..e6e1eb1d0 100755 --- a/src/views/selectbutton/SelectButtonDoc.vue +++ b/src/views/selectbutton/SelectButtonDoc.vue @@ -1,15 +1,13 @@ -
import SelectButton from 'primevue/selectbutton';
- SelectButton requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
+SelectButton requires a value to bind and a collection of arbitrary objects along with the optionLabel property to specify the label property of the option.
<SelectButton v-model="selectedCity" :options="cities" optionLabel="name" />
@@ -31,15 +29,15 @@ export default {
- SelectButton allows selecting only one item by default and setting multiple option enables choosing more than one item. In multiple case, model property should be an array.
+SelectButton allows selecting only one item by default and setting multiple option enables choosing more than one item. In multiple case, model property should be an array.
<SelectButton v-model="selectedCity" :options="cities" optionLabel="brand" :multiple="true" />
- Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter.
+Label of an option is used as the display text of an item by default, for custom content support define an option template that gets the option instance as a parameter.
<SelectButton v-model="selectedCar" :options="cars" optionLabel="brand">
<template #option="slotProps">
@@ -52,201 +50,148 @@ export default {
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
options | -array | -null | -An array of selectitems to display as the available options. | -
optionLabel | -string | -null | -Property name or getter function to use as the label of an option. | -
optionValue | -string | -null | -Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | -
optionDisabled | -boolean | -null | -Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | -
multiple | -boolean | -false | -When specified, allows selecting multiple values. | -
disabled | -boolean | -false | -When present, it specifies that the element should be disabled. | -
dataKey | -string | -null | -A property to uniquely identify an option. | -
ariaLabelledBy | -string | -null | -Establishes relationships between the component and label(s) where its value should be one or more element IDs. | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
options | +array | +null | +An array of selectitems to display as the available options. | +
optionLabel | +string | +null | +Property name or getter function to use as the label of an option. | +
optionValue | +string | +null | +Property name or getter function to use as the value of an option, defaults to the option itself when not defined. | +
optionDisabled | +boolean | +null | +Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. | +
multiple | +boolean | +false | +When specified, allows selecting multiple values. | +
disabled | +boolean | +false | +When present, it specifies that the element should be disabled. | +
dataKey | +string | +null | +A property to uniquely identify an option. | +
ariaLabelledBy | +string | +null | +Establishes relationships between the component and label(s) where its value should be one or more element IDs. | +
Name | -Parameters | -Description | -
---|---|---|
focus | -event: Browser event | -Callback to invoke on focus. | -
blur | -event: Browser event | -Callback to invoke on blur. | -
Name | +Parameters | +Description | +
---|---|---|
focus | +event: Browser event | +Callback to invoke on focus. | +
blur | +event: Browser event | +Callback to invoke on blur. | +
Name | -Parameters | -
---|---|
option | -option: Option instance - index: Index of the option |
-
Name | +Parameters | +
---|---|
option | +option: Option instance + index: Index of the option |
+
None.
-
-<h5>Single Selection</h5>
-<SelectButton v-model="value1" :options="options" />
-
-<h5>Multiple Selection</h5>
-<SelectButton v-model="value2" :options="paymentOptions" optionLabel="name" multiple />
-
-<h5>Custom Content</h5>
-<SelectButton v-model="value3" :options="justifyOptions" dataKey="value">
- <template #option="slotProps">
- <i :class="slotProps.option.icon"></i>
- </template>
-</SelectButton>
-
-
-
-
-export default {
- data() {
- return {
- value1: 'Off',
- value2: null,
- value3: null,
- options: ['Off', 'On'],
- paymentOptions: [
- {name: 'Option 1', value: 1},
- {name: 'Option 2', value: 2},
- {name: 'Option 3', value: 3}
- ],
- justifyOptions: [
- {icon: 'pi pi-align-left', value: 'left'},
- {icon: 'pi pi-align-right', value: 'Right'},
- {icon: 'pi pi-align-center', value: 'Center'},
- {icon: 'pi pi-align-justify', value: 'Justify'}]
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/slider/SliderDoc.vue b/src/views/slider/SliderDoc.vue index d6fa55917..b04171827 100755 --- a/src/views/slider/SliderDoc.vue +++ b/src/views/slider/SliderDoc.vue @@ -1,22 +1,20 @@ -
import Slider from 'primevue/slider';
- Two-way binding is defined using the standard v-model directive.
+Two-way binding is defined using the standard v-model directive.
<Slider v-model="value" />
- Range slider provides two handles to define two values. Enable range property and bind an array to implement a range slider.
+Range slider provides two handles to define two values. Enable range property and bind an array to implement a range slider.
<Slider v-model="value" :range="true" />
@@ -34,231 +32,173 @@ export default {
- Default layout of slider is horizontal, use orientation property for the alternative vertical mode.
+Default layout of slider is horizontal, use orientation property for the alternative vertical mode.
<Slider v-model="value" orientation="vertical" />
- Step factor is 1 by default and can be customized with step option.
+Step factor is 1 by default and can be customized with step option.
<Slider v-model="value" :step="20" />
- Boundaries are specified with min and max attributes.
+Boundaries are specified with min and max attributes.
<Slider v-model="value" :step="20" :min="50" :max="200" />
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -number | -0 | -Value of the component. | -
min | -number | -0 | -Mininum boundary value. | -
max | -number | -100 | -Maximum boundary value. | -
orientation | -string | -horizontal | -Orientation of the slider, valid values are horizontal and vertical. | -
step | -number | -1 | -Step factor to increment/decrement the value. | -
range | -boolean | -false | -When speficed, allows two boundary values to be picked. | -
disabled | -boolean | -false | -When present, it specifies that the component should be disabled. | -
ariaLabelledBy | -string | -null | -Establishes relationships between the component and label(s) where its value should be one or more element IDs. | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +number | +0 | +Value of the component. | +
min | +number | +0 | +Mininum boundary value. | +
max | +number | +100 | +Maximum boundary value. | +
orientation | +string | +horizontal | +Orientation of the slider, valid values are horizontal and vertical. | +
step | +number | +1 | +Step factor to increment/decrement the value. | +
range | +boolean | +false | +When speficed, allows two boundary values to be picked. | +
disabled | +boolean | +false | +When present, it specifies that the component should be disabled. | +
ariaLabelledBy | +string | +null | +Establishes relationships between the component and label(s) where its value should be one or more element IDs. | +
Name | -Parameters | -Description | -
---|---|---|
change | -event.originalEvent: Original event - event.value: Selected option value |
- Callback to invoke on value change. | -
slideEnd | -event.originalEvent: Slide event - event.value: New value. - |
- Callback to invoke when slide ends. | -
Name | +Parameters | +Description | +
---|---|---|
change | +event.originalEvent: Original event + event.value: Selected option value |
+ Callback to invoke on value change. | +
slideEnd | +event.originalEvent: Slide event + event.value: New value. + |
+ Callback to invoke when slide ends. | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-slider | -Container element | -
p-slider-handle | -Handle element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-slider | +Container element | +
p-slider-handle | +Handle element. | +
None.
-
-<h3>Basic: {{value1}}</h3>
-<Slider v-model="value1" />
-
-<h3>Input: {{value2}}</h3>
-<InputText v-model.number="value2" />
-<Slider v-model="value2" />
-
-<h3>Step: {{value3}}</h3>
-<Slider v-model="value3" :step="20" />
-
-<h3>Range: {{value4}}</h3>
-<Slider v-model="value4" :range="true" />
-
-<h3>Vertical: {{value5}}</h3>
-<Slider v-model="value5" orientation="vertical" />
-
-
-
-
-export default {
- data() {
- return {
- value1: null,
- value2: 50,
- value3: 20,
- value4: [20,80],
- value5: 50
- }
- }
-}
-
-
-
-
-.p-slider-horizontal, .p-inputtext {
- width: 14rem;
-}
-
-.p-slider-vertical {
- height: 14rem;
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/textarea/TextareaDoc.vue b/src/views/textarea/TextareaDoc.vue index 745514026..1d3dab1ed 100755 --- a/src/views/textarea/TextareaDoc.vue +++ b/src/views/textarea/TextareaDoc.vue @@ -1,139 +1,99 @@ -
import Textarea from 'primevue/textarea';
- A model can be bound using the standard v-model directive.
+A model can be bound using the standard v-model directive.
<Textarea v-model="value" rows="5" cols="30" />
- In auto resize mode, textarea grows instead of displaying a scrollbar.
+In auto resize mode, textarea grows instead of displaying a scrollbar.
<Textarea v-model="value" :autoResize="true" rows="5" cols="30" />
- Textarea passes any attribute to the underlying textarea element, additional attributes are the following.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
autoResize | -boolean | -false | -When present, height of textarea changes as being typed. | -
Textarea passes any attribute to the underlying textarea element, additional attributes are the following.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
autoResize | +boolean | +false | +When present, height of textarea changes as being typed. | +
Any valid event such as focus, blur and input are passed to the underlying input element.
+Any valid event such as focus, blur and input are passed to the underlying input element.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-inputtextarea | -Textarea element | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputtextarea | +Textarea element | +
None.
-
-<h3>Basic</h3>
-<Textarea v-model="value1" rows="5" cols="30" />
-
-<h3>Auto Resize</h3>
-<Textarea v-model="value2" :autoResize="true" rows="5" cols="30" />
-
-<h3>Disabled</h3>
-<Textarea v-model="value3" disabled rows="5" cols="30" />
-
-
-
-
-export default {
- data() {
- return {
- value1: '',
- value2: '',
- value3: ''
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/togglebutton/ToggleButtonDoc.vue b/src/views/togglebutton/ToggleButtonDoc.vue index 2b56ec339..c9781872e 100755 --- a/src/views/togglebutton/ToggleButtonDoc.vue +++ b/src/views/togglebutton/ToggleButtonDoc.vue @@ -1,21 +1,19 @@ -
import ToggleButton from 'primevue/togglebutton';
- Two-way binding to a boolean property is defined using the standard v-model directive.
+Two-way binding to a boolean property is defined using the standard v-model directive.
<ToggleButton v-model="checked" />
- As model is two-way binding enabled, setting the bound value as true displays the state as checked.
+As model is two-way binding enabled, setting the bound value as true displays the state as checked.
export default {
data() {
@@ -27,167 +25,133 @@ export default {
- Icons and Labels can be customized using onLabel, offLabel, onIcon and offIcon properties.
+Icons and Labels can be customized using onLabel, offLabel, onIcon and offIcon properties.
<ToggleButton v-model="checked" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" />
- Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -any | -null | -Value of the component. | -
onIcon | -string | -null | -Icon for the on state. | -
offIcon | -string | -null | -Icon for the off state. | -
onLabel | -string | -yes | -Label for the on state. | -
offLabel | -string | -no | -Label for the off state. | -
iconPos | -string | -left | -Position of the icon, valid values are "left" and "right". | -
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +any | +null | +Value of the component. | +
onIcon | +string | +null | +Icon for the on state. | +
offIcon | +string | +null | +Icon for the off state. | +
onLabel | +string | +yes | +Label for the on state. | +
offLabel | +string | +no | +Label for the off state. | +
iconPos | +string | +left | +Position of the icon, valid values are "left" and "right". | +
Name | -Parameters | -Description | -
---|---|---|
change | -event: Browser event | -Callback to invoke on value change. | -
Name | +Parameters | +Description | +
---|---|---|
change | +event: Browser event | +Callback to invoke on value change. | +
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-togglebutton | -Container element | -
p-button-icon | -Icon element. | -
p-button-text | -Label element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-togglebutton | +Container element | +
p-button-icon | +Icon element. | +
p-button-text | +Label element. | +
None.
-
-<h3>Basic</h3>
-<ToggleButton v-model="checked1" onIcon="pi pi-check" offIcon="pi pi-times" />
-
-<h3>Customized</h3>
-<ToggleButton v-model="checked2" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" style="width: 10em" />
-
-
-
-
-export default {
- data() {
- return {
- checked1: false,
- checked2: true
- }
- }
-}
-
-
- None.
+ \ No newline at end of file diff --git a/src/views/tristatecheckbox/TriStateCheckboxDoc.vue b/src/views/tristatecheckbox/TriStateCheckboxDoc.vue index 804b4d6ba..05ce0463f 100755 --- a/src/views/tristatecheckbox/TriStateCheckboxDoc.vue +++ b/src/views/tristatecheckbox/TriStateCheckboxDoc.vue @@ -1,127 +1,92 @@ -
import TriStateCheckbox from 'primevue/tristatecheckbox';
- A model can be bound using the standard v-model directive.
+A model can be bound using the standard v-model directive.
<TriStateCheckbox v-model="value" />
- Any property such as name and autofocus are passed to the underlying input element. Following is the additional property to configure the component.
-Name | -Type | -Default | -Description | -
---|---|---|---|
modelValue | -boolean | -null | -Value of the component. | -
Any property such as name and autofocus are passed to the underlying input element. Following is the additional property to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
modelValue | +boolean | +null | +Value of the component. | +
Any valid event such as focus and blur.
+Any valid event such as focus and blur.
-Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-chkbox | -Container element | -
p-tristatechkbox | -Container element | -
p-chkbox-box | -Container of icon. | -
p-chkbox-icon | -Icon element. | -
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-chkbox | +Container element | +
p-tristatechkbox | +Container element | +
p-chkbox-box | +Container of icon. | +
p-chkbox-icon | +Icon element. | +
None.
-
-<div class="p-field-checkbox p-m-0">
- <TriStateCheckbox v-model="value" />
- <label>{{value == null ? 'null' : value}}</label>
-</div>
-
-
-
-
-export default {
- data() {
- return {
- value: null
- }
- }
-}
-
-
- None.
+ \ No newline at end of file