1.0.2 • Published 5 years ago

vue-cute-rate v1.0.2

Weekly downloads
28
License
MIT
Repository
github
Last release
5 years ago

vue-cute-rate

NPM version NPM downloads CircleCI

Rate with star, heart, emoji or anything you like.

See the beautiful doc for vue-cute-rate. Powered by kokk 🍹

Install

yarn add vue-cute-rate --save

CDN: UNPKG | jsDelivr (available as window.rate)

API

See the doc for live demo and details.

PropertyDescriptiontypeDefault
countstar countnumber5
value / v-modelcurrent valuenumber0
star-halfwhether to allow semi selectionbooleanfalse
disabledread only, unable to interactbooleanfalse
disabled-cursorset mouse cursor to not-allowed when hover a read only elementbooleanfalse
allow-clearwhether to allow clear when click againbooleantrue
font-sizeset the font size of characterstring22px
typethere are 3 cute types of iconfont by default, star star1 and heartstringstar
hover-changesupport set hover-change to change value when hoverbooleanfalse
active-colorcolor of the active valuesstring#fadb14
inactive-colorcolor of the inactive valuesstring#e9e9e9
hover-colorcolor when hover a valuestringsame as activeColor by default
inactive-charthe inactive character, only rendered when use a customChar slotstring- (hyphen)
on-hover-changecallback when hover itemFunction(value: number)-
on-changecallback when select valueFunction(value: number)-

slot

rateChar

Use the slot when replace the default star to other character like alphabet, digit, iconfont or anything which can be controled by color.

The slot name is rateChar, and make sure to write slot-scope="props" :class="props.computeClass" as well. We need Scoped Slots and compute classnames by props.

customChar

Use the slot when replace the default star to other character like image, Unicode, or anything which cannot be controled by color. At the same time, you may want to set the inactive character.

The slot name is customChar, and make sure to write slot-scope="props" :class="props.computeClass" as well. We need Scoped Slots and compute classnames by props.

License

MIT © luyilin

minemine.cc · GitHub @luyilin · Twitter @luyilin12

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago