This component is only used to present score by five stars.
<!-- if your want to show score text, set 'show-score' as true: -->
<!-- :show-score="true" or show-score -->
<five-star-eval
v-for="(score, index) in scores"
:key="index"
:score="score"
show-score/>
import Vue from 'vue'
import FiveStarEval from 'five-star-eval'
Vue.use(FiveStarEval)
export default {
name: 'App',
data() {
return {
scores: [0.1, 0.5, 1.1, 1.5, 2.1, 2.7, 2.9, 3.5, 3.9, 4.3, 4.8]
}
}
}
PROP NAME | TYPE | OPTIONS | DEFAULT | DESC |
---|---|---|---|---|
score | Number | - | - | - |
inactiveColor | String | - | #d5d5d5 | inactive star color |
activeColor | String | - | orange | active star color |
showScore | Boolean | - | false | show score text |
scoreColor | String | - | #666666 | score text color |