|
|
@ -100,24 +100,29 @@ export default {
|
|
|
|
Icon,
|
|
|
|
Icon,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
render (createElement) {
|
|
|
|
render (createElement) {
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
|
|
|
classes, onMouseLeave, onClick, countList, onHover,
|
|
|
|
|
|
|
|
disabled, prefixCls, allowHalf, hoverValue,
|
|
|
|
|
|
|
|
stateValue, character, hasDefaultSlot,
|
|
|
|
|
|
|
|
} = this
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<ul
|
|
|
|
<ul
|
|
|
|
class={this.classes}
|
|
|
|
class={classes}
|
|
|
|
onMouseleave={this.onMouseLeave}>
|
|
|
|
onMouseleave={onMouseLeave}>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.countList.map((item, i) => {
|
|
|
|
countList.map((item, i) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Star
|
|
|
|
<Star
|
|
|
|
ref={'stars' + i}
|
|
|
|
ref={'stars' + i}
|
|
|
|
index={i}
|
|
|
|
index={i}
|
|
|
|
disabled={this.disabled}
|
|
|
|
disabled={disabled}
|
|
|
|
prefixCls={`${this.prefixCls}-star`}
|
|
|
|
prefixCls={`${prefixCls}-star`}
|
|
|
|
allowHalf={this.allowHalf}
|
|
|
|
allowHalf={allowHalf}
|
|
|
|
value={this.hoverValue === undefined ? this.stateValue : this.hoverValue}
|
|
|
|
value={hoverValue === undefined ? stateValue : hoverValue}
|
|
|
|
onClick={this.onClick}
|
|
|
|
onClick={onClick}
|
|
|
|
onHover={this.onHover}
|
|
|
|
onHover={onHover}
|
|
|
|
key={i}>
|
|
|
|
key={i}>
|
|
|
|
{(this.hasDefaultSlot) ? (cloneVNodes(this.$slots.default, true)) : this.character}
|
|
|
|
{(hasDefaultSlot) ? (cloneVNodes(this.$slots.default, true)) : character}
|
|
|
|
</Star>
|
|
|
|
</Star>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|
|
|
|