vue-star-rating
vue-star-rating copied to clipboard
number of reviews
can we add how many review has been given like i shared in screenshot
just beside the rating...
if its possible can someone please help me with that??
I like this idea, and will see if I can add it in when no rating has been selected by the user. If you want to do this now, you can use the inline
prop and set the show-star-rating
prop to false and wrap that in a div
. Here's an example of the markup for read-only
stars:
<div class="stars">
<star-rating v-model="avg" :round-start-rating="false" read-only inline :show-rating="false"></star-rating> {{avg}} / {{total}}
</div>
See Fiddle: https://jsfiddle.net/mjh6b174/
If you want the user to be able to select a rating you will probably want to use the rating-selected
and current-rating
events to sync everything, this is a little more involved, but you can check it out an example here: https://jsfiddle.net/7a3Lsycu/:
@craigh411 thanks alot man