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
|
|
|
|
},
|
|
|
|
cancel: {
|
|
|
|
type: Boolean,
|
2024-03-26 07:28:22 +00:00
|
|
|
default: false
|
2023-05-24 12:46:10 +00:00
|
|
|
},
|
|
|
|
onIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
offIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
cancelIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: RatingStyle,
|
2023-06-02 14:28:59 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 12:46:10 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|