Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of reviews #44

Open
kaisanjay opened this issue Jan 29, 2019 · 2 comments
Open

number of reviews #44

kaisanjay opened this issue Jan 29, 2019 · 2 comments

Comments

@kaisanjay
Copy link

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??

@craigh411
Copy link
Owner

craigh411 commented Jan 29, 2019

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/:

@kaisanjay
Copy link
Author

@craigh411 thanks alot man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants