Skip to content

Commit

Permalink
feat: 修复 rangeInput disabled api
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin committed Sep 22, 2022
1 parent 836a362 commit 1177336
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/date-picker/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
allowInput | Boolean | false | 是否允许输入日期 | N
clearable | Boolean | false | 是否显示清楚按钮 | N
disableDate | Object / Array / Function | - | 禁用日期,示例:['A', 'B'] 表示日期 A 和日期 B 会被禁用。{ from: 'A', to: 'B' } 表示在 A 到 B 之间的日期会被禁用。{ before: 'A', after: 'B' } 表示在 A 之前和在 B 之后的日期都会被禁用。其中 A = '2021-01-01',B = '2021-02-01'。值类型为 Function 则表示返回值为 true 的日期会被禁用。TS 类型:`DisableRangeDate` `type DisableRangeDate = Array<DateValue> | DisableDateObj | ((context: { date: DateRangeValue; partial: DateRangePickerPartial }) => boolean)` `interface DisableDateObj { from?: string; to?: string; before?: string; after?: string }` `type DateRangePickerPartial = 'start' | 'end'`[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N
disabled | Boolean | - | 是否禁用组件,值为数组表示可分别控制开始日期和结束日期是否禁用 | N
disabled | Boolean | - | 是否禁用组件 | N
enableTimePicker | Boolean | false | 是否显示时间选择 | N
firstDayOfWeek | Number | - | 第一天从星期几开始。可选项:1/2/3/4/5/6/7 | N
format | String | - | 用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format) | N
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface TdDateRangePickerProps {
*/
disableDate?: DisableRangeDate;
/**
* 是否禁用组件,值为数组表示可分别控制开始日期和结束日期是否禁用
* 是否禁用组件
*/
disabled?: boolean;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/range-input/range-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
activeIndex | Number | - | 输入框高亮状态序号 | N
clearable | Boolean | false | 是否可清空 | N
disabled | Boolean | - | 是否禁用范围输入框,值为数组表示可分别控制某一个输入框是否禁用 | N
disabled | Boolean | - | 是否禁用范围输入框 | N
format | Array / Function | - | 指定输入框展示值的格式。TS 类型:`InputFormatType | Array<InputFormatType>` | N
inputProps | Object / Array | - | 透传 Input 输入框组件全部属性,数组第一项表示第一个输入框属性,第二项表示第二个输入框属性。示例:`[{ label: 'A', name: 'A-name' }, { label: 'B', name: 'B-name' }]`。TS 类型:`InputProps | Array<InputProps>`[Input API Documents](./input?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/range-input/type.ts) | N
label | TNode | - | 左侧内容。TS 类型:`string | TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
Expand Down
2 changes: 1 addition & 1 deletion src/range-input/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TdRangeInputProps {
*/
clearable?: boolean;
/**
* 是否禁用范围输入框,值为数组表示可分别控制某一个输入框是否禁用
* 是否禁用范围输入框
*/
disabled?: boolean;
/**
Expand Down

0 comments on commit 1177336

Please sign in to comment.