diff --git a/src/components/rating/Rating.vue b/src/components/rating/Rating.vue index 5c134d0d4..77dd2cf59 100644 --- a/src/components/rating/Rating.vue +++ b/src/components/rating/Rating.vue @@ -10,12 +10,12 @@ export default { props: { value: Number, + disabled: Boolean, + readonly: Boolean, stars: { type: Number, default: 5 }, - readonly: Boolean, - disabled: Boolean, cancel: { type: Boolean, default: true diff --git a/src/views/rating/RatingDemo.vue b/src/views/rating/RatingDemo.vue index 9a57660be..2bf7b26bc 100644 --- a/src/views/rating/RatingDemo.vue +++ b/src/views/rating/RatingDemo.vue @@ -9,7 +9,7 @@
Two-way value binding is defined using v-model.
+Number of stars to display is defined with stars property, default is 5.
+A cancel icon is displayed to reset the value by default, set cancel as false to remove this option.
+Name | +Type | +Default | +Description | +
---|---|---|---|
value | +number | +null | +Value of the rating. | +
disabled | +boolean | +false | +When present, it specifies that the element should be disabled. | +
readonly | +boolean | +false | +When present, changing the value is not possible. | +
stars | +number | +5 | +Number of stars. | +
cancel | +boolean | +true | +When specified a cancel icon is displayed to allow removing the value. | +
Name | +Parameters | +Description | +
---|---|---|
change | +event.originalEvent: Browser event + event.value: selected value + |
+ Callback to invoke on value change. | +
input | +event: selected 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. | +
None.
+