Vue-poll
A Vue.js component for voting.
Prerequisites
- Vue.js 2
Installing
Using npm:
Using cdn:
Example (NPM)
Define vue-poll
component markup inside your custom component.
For example in your my-poll.vue
:
Example (CDN)
Options
-
question (required) (string-html)
The question of the poll.
-
answers (required) (array)
An array of the answers of the poll.
value (required) (integer)
A unique value for each answertext (required) (string-html)
Answer's textvotes (required) (integer)
Answer's votescustom_class (optional) (string)
Custom css class for the answer element -
showResults (optional) (boolean) (default: false)
Set this to true to skip the votting and show the results of the poll
-
finalResults (optional) (boolean) (default: false)
Set this to true to skip the votting and show the results of the poll. Winner will be highlighted