[new feature] Rate: add icon、void-icon prop (#2148)

This commit is contained in:
neverland
2018-11-26 17:12:03 +08:00
committed by GitHub
parent 1a53683353
commit d337bd2e20
5 changed files with 73 additions and 11 deletions
+17 -6
View File
@@ -4,9 +4,17 @@
<van-rate v-model="value1" />
</demo-block>
<demo-block :title="$t('customColor')">
<demo-block :title="$t('customIcon')">
<van-rate
v-model="value2"
icon="like"
void-icon="like-o"
/>
</demo-block>
<demo-block :title="$t('customStyle')">
<van-rate
v-model="value3"
:size="25"
:count="6"
color="#2ba"
@@ -16,7 +24,7 @@
<demo-block :title="$t('disabled')">
<van-rate
v-model="value3"
v-model="value4"
disabled
/>
</demo-block>
@@ -28,19 +36,22 @@ export default {
i18n: {
'zh-CN': {
disabled: '禁用状态',
customColor: '自定义颜色'
customIcon: '自定义图标',
customStyle: '自定义样式'
},
'en-US': {
disabled: 'Disabled',
customColor: 'Custom Color'
customIcon: 'Custom Icon',
customStyle: 'Custom Style'
}
},
data() {
return {
value1: 3,
value2: 4,
value3: 2
value2: 3,
value3: 4,
value4: 2
};
}
};