From a75e4cfb18ca7adc7ac4765be7463f06695683aa Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 8 Aug 2019 20:48:24 +0800 Subject: [PATCH] [new feature] ActionSheet: add color option (#4073) --- src/action-sheet/README.md | 3 ++- src/action-sheet/README.zh-CN.md | 5 +++-- src/action-sheet/demo/index.vue | 4 +++- src/action-sheet/index.tsx | 2 ++ .../test/__snapshots__/index.spec.js.snap | 6 ++++++ src/action-sheet/test/index.spec.js | 11 +++++++++++ src/radio/README.zh-CN.md | 4 ++-- 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/action-sheet/README.md b/src/action-sheet/README.md index 960421ebc..e7041a76a 100644 --- a/src/action-sheet/README.md +++ b/src/action-sheet/README.md @@ -58,7 +58,7 @@ export default { return { show: false, actions: [ - { name: 'Option' }, + { name: 'Option', color: '#07c160' }, { loading: true }, { name: 'Disabled Option', disabled: true } ] @@ -124,6 +124,7 @@ export default { |------|------|------| | name | Title | `string` | | subname | Subtitle | `string` | +| color | Text color | `string` | | className | className for the option | `any` | | loading | Whether to be loading status | `boolean` | | disabled | Whether to be disabled | `boolean` | diff --git a/src/action-sheet/README.zh-CN.md b/src/action-sheet/README.zh-CN.md index 27dc1e64c..51a15ad5c 100644 --- a/src/action-sheet/README.zh-CN.md +++ b/src/action-sheet/README.zh-CN.md @@ -61,8 +61,8 @@ export default { return { show: false, actions: [ - { name: '选项' }, - { name: '选项', loading: true }, + { name: '选项', color: '#07c160' }, + { loading: true }, { name: '禁用选项', disabled: true } ] }; @@ -133,6 +133,7 @@ export default { |------|------|------| | name | 标题 | `string` | | subname | 二级标题 | `string` | +| color | 选项文字颜色 | `string` | | className | 为对应列添加额外的 class | `any` | | loading | 是否为加载状态 | `boolean` | | disabled | 是否为禁用状态 | `boolean` | diff --git a/src/action-sheet/demo/index.vue b/src/action-sheet/demo/index.vue index 94fa057c9..12b922602 100644 --- a/src/action-sheet/demo/index.vue +++ b/src/action-sheet/demo/index.vue @@ -66,6 +66,8 @@