update Rate
update Rate
This commit is contained in:
parent
962c40bd3d
commit
e5ac79258a
8 changed files with 32 additions and 3 deletions
|
@ -7,12 +7,18 @@
|
|||
@click="handleClick(item)">
|
||||
<span :class="[prefixCls + '-star-content']" type="half"></span>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-text']" v-if="showText">
|
||||
<slot>{{ value }} <template v-if="value <= 1">{{ t('i.rate.star') }}</template><template v-else>{{ t('i.rate.stars') }}</template></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Locale from '../../mixins/locale';
|
||||
|
||||
const prefixCls = 'ivu-rate';
|
||||
|
||||
export default {
|
||||
mixins: [ Locale ],
|
||||
props: {
|
||||
count: {
|
||||
type: Number,
|
||||
|
@ -29,6 +35,10 @@
|
|||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showText: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -83,6 +83,10 @@ export default {
|
|||
page: '/page',
|
||||
goto: 'Goto',
|
||||
p: ''
|
||||
},
|
||||
rate: {
|
||||
star: 'Star',
|
||||
stars: 'Stars'
|
||||
}
|
||||
}
|
||||
};
|
|
@ -83,6 +83,10 @@ export default {
|
|||
page: '条/页',
|
||||
goto: '跳至',
|
||||
p: '页'
|
||||
},
|
||||
rate: {
|
||||
star: '星',
|
||||
stars: '星'
|
||||
}
|
||||
}
|
||||
};
|
|
@ -83,6 +83,10 @@ export default {
|
|||
page: '條/頁',
|
||||
goto: '跳至',
|
||||
p: '頁'
|
||||
},
|
||||
rate: {
|
||||
star: '星',
|
||||
stars: '星'
|
||||
}
|
||||
}
|
||||
};
|
|
@ -8,7 +8,6 @@
|
|||
vertical-align: middle;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-family: 'Ionicons';
|
||||
|
||||
&-disabled &-star {
|
||||
&:before,
|
||||
|
@ -26,6 +25,7 @@
|
|||
padding: 0;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
font-family: 'Ionicons';
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
|
@ -63,4 +63,10 @@
|
|||
color: tint(@rate-star-color, 20%);
|
||||
}
|
||||
}
|
||||
&-text {
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue