vue-star-rating icon indicating copy to clipboard operation
vue-star-rating copied to clipboard

number of reviews

Open kaisanjay opened this issue 6 years ago • 2 comments

can we add how many review has been given like i shared in screenshot rating

just beside the rating...

if its possible can someone please help me with that??

kaisanjay avatar Jan 29 '19 13:01 kaisanjay

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 avatar Jan 29 '19 15:01 craigh411

@craigh411 thanks alot man

kaisanjay avatar Jan 31 '19 11:01 kaisanjay