update Rate #3853
This commit is contained in:
parent
b9ecbd5384
commit
29a2cb0c60
1 changed files with 8 additions and 12 deletions
|
@ -10,20 +10,16 @@
|
|||
<template v-if="!showCharacter">
|
||||
<span :class="[prefixCls + '-star-content']" type="half"></span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="character !== ''">
|
||||
<span :class="[prefixCls + '-star-first']" type="half">{{ character }}</span>
|
||||
<span :class="[prefixCls + '-star-second']">{{ character }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span :class="[prefixCls + '-star-first']" type="half">
|
||||
<i :class="iconClasses" type="half"></i>
|
||||
<template v-if="character !== ''">{{ character }}</template>
|
||||
<i v-else :class="iconClasses" type="half"></i>
|
||||
</span>
|
||||
<span :class="[prefixCls + '-star-second']">
|
||||
<i :class="iconClasses"></i>
|
||||
<template v-if="character !== ''">{{ character }}</template>
|
||||
<i v-else :class="iconClasses"></i>
|
||||
</span>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-text']" v-if="showText" v-show="currentValue > 0">
|
||||
<slot><span>{{ currentValue }}</span> <span v-if="currentValue <= 1">{{ t('i.rate.star') }}</span><span v-else>{{ t('i.rate.stars') }}</span></slot>
|
||||
|
|
Loading…
Add table
Reference in a new issue