From 9ecbcae725e9c46311db1d9c6013676043dac1f0 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 11 Apr 2019 17:14:34 +0800 Subject: [PATCH] [new feature] Rate: add allow-half prop (#3134) --- packages/rate/demo/index.vue | 49 ++++++- packages/rate/en-US.md | 40 +++++- packages/rate/index.less | 16 ++- packages/rate/index.tsx | 95 +++++++++----- .../rate/test/__snapshots__/demo.spec.js.snap | 122 ++++++++++++++---- packages/rate/test/index.spec.js | 24 +++- packages/rate/zh-CN.md | 42 +++++- 7 files changed, 314 insertions(+), 74 deletions(-) diff --git a/packages/rate/demo/index.vue b/packages/rate/demo/index.vue index c75b56811..b3b880ef8 100644 --- a/packages/rate/demo/index.vue +++ b/packages/rate/demo/index.vue @@ -16,18 +16,42 @@ + + + + + + + + + + + + @@ -35,14 +59,20 @@ export default { i18n: { 'zh-CN': { + halfStar: '半星', disabled: '禁用状态', customIcon: '自定义图标', - customStyle: '自定义样式' + customStyle: '自定义样式', + customCount: '自定义数量', + readonly: '只读状态' }, 'en-US': { + halfStar: 'Half Star', disabled: 'Disabled', customIcon: 'Custom Icon', - customStyle: 'Custom Style' + customStyle: 'Custom Style', + customCount: 'Custom Count', + readonly: 'Readonly' } }, @@ -50,8 +80,10 @@ export default { return { value1: 3, value2: 3, - value3: 4, - value4: 2 + value3: 3, + value4: 2.5, + value5: 4, + value6: 3 }; } }; @@ -59,6 +91,9 @@ export default {