2023-05-24 12:46:10 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import RatingStyle from 'primevue/rating/style';
|
2023-05-24 12:46:10 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseRating',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: {
|
|
|
|
type: Number,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
readonly: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
stars: {
|
|
|
|
type: Number,
|
|
|
|
default: 5
|
|
|
|
},
|
|
|
|
onIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
offIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: RatingStyle,
|
2023-06-02 14:28:59 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
2024-04-25 01:26:06 +00:00
|
|
|
$pcRating: this,
|
2023-06-02 14:28:59 +00:00
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 12:46:10 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|