From d27626ada238bc52c64cfa3e65a2fe74cc5f419e Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 31 Jan 2021 18:36:11 +0800 Subject: [PATCH] feat(Popover): support config action color (#8049) --- src/popover/README.md | 1 + src/popover/README.zh-CN.md | 1 + src/popover/index.js | 3 ++- src/popover/test/__snapshots__/index.spec.js.snap | 6 +++--- src/popover/test/index.spec.js | 14 ++++++++++++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/popover/README.md b/src/popover/README.md index f05a80638..e9cf5946e 100644 --- a/src/popover/README.md +++ b/src/popover/README.md @@ -221,6 +221,7 @@ export default { | --------- | ----------------------- | --------------------------- | | text | Action Text | _string_ | | icon | Icon | _string_ | +| color | Action Color | _string_ | | disabled | Whether to be disabled | _boolean_ | | className | className of the option | _string \| Array \| object_ | diff --git a/src/popover/README.zh-CN.md b/src/popover/README.zh-CN.md index 7df97a9ca..a4e108dae 100644 --- a/src/popover/README.zh-CN.md +++ b/src/popover/README.zh-CN.md @@ -237,6 +237,7 @@ export default { | --- | --- | --- | | text | 选项文字 | _string_ | | icon | 文字左侧的图标,支持传入[图标名称](#/zh-CN/icon)或图片链接 | _string_ | +| color | 选项文字颜色 | _string_ | | disabled | 是否为禁用状态 | _boolean_ | | className | 为对应选项添加额外的类名 | _string \| Array \| object_ | diff --git a/src/popover/index.js b/src/popover/index.js index b81125595..c228ef67c 100644 --- a/src/popover/index.js +++ b/src/popover/index.js @@ -124,11 +124,12 @@ export default createComponent({ }; const renderAction = (action, index) => { - const { icon, text, disabled, className } = action; + const { icon, text, color, disabled, className } = action; return (