From 7190bbd980b978fd59acd726736507de456e0bc9 Mon Sep 17 00:00:00 2001 From: catchonme Date: Thu, 1 Aug 2019 19:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=AE=9A=E5=88=B6=E9=BB=98=E8=AE=A4=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/renderers/Form/Checkboxes.md | 2 ++ docs/renderers/Form/Color.md | 2 ++ src/components/ColorPicker.tsx | 3 +++ src/renderers/Form/Color.tsx | 1 + 4 files changed, 8 insertions(+) diff --git a/docs/renderers/Form/Checkboxes.md b/docs/renderers/Form/Checkboxes.md index 979c1cd3a..b3963672c 100644 --- a/docs/renderers/Form/Checkboxes.md +++ b/docs/renderers/Form/Checkboxes.md @@ -11,6 +11,8 @@ - `extractValue` 默认为 `false`, `joinValues`设置为`false`时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。 - `delimiter` 默认为 `,` - `columnsCount` 默认为 `1` 可以配置成一行显示多个。 +- `checkAll` 默认为 `false` 开启后支持全选 +- `defaultCheckAll` 是否默认全选,默认为`false` - **还有更多通用配置请参考** [FormItem](./FormItem.md) ```schema:height="330" scope="form" diff --git a/docs/renderers/Form/Color.md b/docs/renderers/Form/Color.md index 3fb47ebc5..42cd3f3cd 100644 --- a/docs/renderers/Form/Color.md +++ b/docs/renderers/Form/Color.md @@ -4,6 +4,8 @@ - `type` 请设置成 `color` - `format` 请选择 `hex`、`hls`、`rgb`或者`rgba`。默认为 `hex`。 +- `presetColors` 选择器底部的默认颜色 + - 默认为`['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF']`,数组内为空则不显示默认颜色 - `clearable` 是否显示清除按钮。 ```schema:height="400" scope="form-item" diff --git a/src/components/ColorPicker.tsx b/src/components/ColorPicker.tsx index 5de0ac20f..e36986a06 100644 --- a/src/components/ColorPicker.tsx +++ b/src/components/ColorPicker.tsx @@ -27,6 +27,7 @@ export interface ColorProps { classPrefix: string; classnames: ClassNamesFn; onChange: (value: any) => void; + presetColors?: string[]; } export interface ColorControlState { @@ -178,6 +179,7 @@ export class ColorControl extends React.PureComponent diff --git a/src/renderers/Form/Color.tsx b/src/renderers/Form/Color.tsx index 63b3b2eae..f16d9398d 100644 --- a/src/renderers/Form/Color.tsx +++ b/src/renderers/Form/Color.tsx @@ -11,6 +11,7 @@ export interface ColorProps extends FormControlProps { format?: string; timeConstrainst?: object; closeOnSelect?:boolean; + presetColors?: string[]; }; export interface ColorControlState {