Skip to content

Commit dcd8dfc

Browse files
committed
chore: update snapshot and fix type
1 parent 10d4ded commit dcd8dfc

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

src/date-picker/date-picker.en-US.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./in
2020
label | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
2121
mode | String | date | options: year/quarter/month/week/date | N
2222
multiple | Boolean | false | support multiple date,but not support being use together with range-picker、enableTimePicker and allowInput。Typescript:`boolean` | N
23-
needConfirm | Boolean | true | whether a confirmation button needs to be clicked to complete the action in the date-time picker scenario, default is true | N
2423
placeholder | String / Array | undefined | Typescript:`string` | N
2524
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
2625
prefixIcon | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
@@ -71,7 +70,6 @@ firstDayOfWeek | Number | - | options: 1/2/3/4/5/6/7 | N
7170
format | String | - | \- | N
7271
label | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
7372
mode | String | date | options: year/quarter/month/week/date | N
74-
needConfirm | Boolean | true | whether a confirmation button needs to be clicked to complete the action in the date-time range picker scenario, default is true | N
7573
panelPreselection | Boolean | true | \- | N
7674
placeholder | String / Array | - | Typescript:`string \| Array<string>` | N
7775
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
@@ -114,7 +112,7 @@ preset-click | `(context: { preset: PresetDate, e: MouseEvent })` | \-
114112
name | type | default | description | required
115113
-- | -- | -- | -- | --
116114
defaultTime | String | '00:00:00' | Time selector default value | N
117-
`Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps' \| 'needConfirm'>` | \- | - | extends `Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps' \| 'needConfirm'>` | N
115+
`Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps'>` | \- | - | extends `Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps'>` | N
118116
onCellClick | Function | | Typescript:`(context: { date: Date, e: MouseEvent }) => void`<br/> | N
119117
onChange | Function | | Typescript:`(value: DateValue, context: { dayjsValue?: Dayjs, e?: MouseEvent, trigger?: DatePickerTriggerSource }) => void`<br/> | N
120118
onConfirm | Function | | Typescript:`(context: { date: Date, e: MouseEvent }) => void`<br/> | N

src/date-picker/date-picker.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ inputProps | Object | - | 透传给输入框(Input)组件的参数。TS 类
2020
label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
2121
mode | String | date | 选择器模式。可选项:year/quarter/month/week/date | N
2222
multiple | Boolean | false | 支持多选日期,但不支持在range-picker中,或与enableTimePicker、allowInput 一起使用。TS 类型:`boolean` | N
23-
needConfirm | Boolean | true | 决定在日期时间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为`true` | N
2423
placeholder | String / Array | undefined | 占位符。TS 类型:`string` | N
2524
popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`[Popup API Documents](./popup?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
2625
prefixIcon | Slot / Function | - | 用于自定义组件前置图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
2726
presets | Object | - | 预设快捷日期选择,示例:`{ '元旦': '2021-01-01', '昨天': dayjs().subtract(1, 'day').format('YYYY-MM-DD'), '特定日期': () => ['2021-02-01'] }`。TS 类型:`PresetDate` `interface PresetDate { [name: string]: DateValue \| (() => DateValue) }`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
2827
presetsPlacement | String | bottom | 预设面板展示区域(包含确定按钮)。可选项:left/top/right/bottom | N
29-
selectInputProps | Object | - | 透传 SelectInput 筛选器输入框组件的全部属性。TS 类型:`SelectInputProps`[SelectInput API Documents](./select-input?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
28+
readonly | Boolean | false | 只读状态,值为真会隐藏输入框,且无法打开下拉框 | N
3029
size | String | medium | 输入框尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
3130
status | String | default | 输入框状态。可选项:default/success/warning/error | N
3231
suffixIcon | Slot / Function | - | 用于自定义组件后置图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
@@ -60,7 +59,6 @@ preset-click | `(context: { preset: PresetDate, e: MouseEvent })` | 点击预设
6059
-- | -- | -- | -- | --
6160
allowInput | Boolean | false | 是否允许输入日期 | N
6261
borderless | Boolean | false | 无边框模式 | N
63-
cancelRangeSelectLimit | Boolean | false | 默认的日期选择交互是根据点击前后日期的顺序来决定并且会加以限制。比如:用户先点击开始时间输入框,选择了一个日期例如2020-05-15,紧接着交互会自动将焦点跳到结束日期输入框,等待用户选择结束时间。此时用户只能选择大于2020-05-15的日期(之前的日期会被灰态禁止点击,限制用户的点击)。当该值传递`true`时,则取消该限制 | N
6462
clearable | Boolean | false | 是否显示清除按钮 | N
6563
defaultTime | Array | ["00:00:00", "23:59:59"] | 时间选择器默认值,当 value/defaultValue 未设置值时有效。TS 类型:`string[]` | N
6664
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-vue/tree/develop/src/date-picker/type.ts) | N
@@ -71,7 +69,6 @@ firstDayOfWeek | Number | - | 第一天从星期几开始。可选项:1/2/3/4/
7169
format | String | - | 用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format) | N
7270
label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
7371
mode | String | date | 选择器模式。可选项:year/quarter/month/week/date | N
74-
needConfirm | Boolean | true | 决定在日期时间区间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为 `true` | N
7572
panelPreselection | Boolean | true | 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期 | N
7673
placeholder | String / Array | - | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array<string>` | N
7774
popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`[Popup API Documents](./popup?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
@@ -114,7 +111,7 @@ preset-click | `(context: { preset: PresetDate, e: MouseEvent })` | 点击预设
114111
名称 | 类型 | 默认值 | 描述 | 必传
115112
-- | -- | -- | -- | --
116113
defaultTime | String | '00:00:00' | 时间选择器默认值,当 value/defaultValue 未设置值时有效 | N
117-
`Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps' \| 'needConfirm'>` | \- | - | 继承 `Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps' \| 'needConfirm'>` 中的全部属性 | N
114+
`Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps'>` | \- | - | 继承 `Pick<DatePickerProps, 'value' \| 'defaultValue' \| 'disableDate' \| 'disableTime' \| 'enableTimePicker' \| 'firstDayOfWeek' \| 'format' \| 'mode' \| 'presets' \| 'presetsPlacement' \| 'timePickerProps'>` 中的全部属性 | N
118115
onCellClick | Function | | TS 类型:`(context: { date: Date, e: MouseEvent }) => void`<br/>点击日期单元格时触发 | N
119116
onChange | Function | | TS 类型:`(value: DateValue, context: { dayjsValue?: Dayjs, e?: MouseEvent, trigger?: DatePickerTriggerSource }) => void`<br/>选中值发生变化时触发。参数 `context.trigger` 表示触发当前事件的来源,不同的模式触发来源也会不同 | N
120117
onConfirm | Function | | TS 类型:`(context: { date: Date, e: MouseEvent }) => void`<br/>如果存在“确定”按钮,则点击“确定”按钮时触发 | N

src/date-picker/type.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ export interface TdDatePickerProps {
7878
* @default false
7979
*/
8080
multiple?: boolean;
81-
/**
82-
* 决定在日期时间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为`true`
83-
* @default true
84-
*/
85-
needConfirm?: boolean;
8681
/**
8782
* 占位符
8883
*/
@@ -104,10 +99,6 @@ export interface TdDatePickerProps {
10499
* @default bottom
105100
*/
106101
presetsPlacement?: 'left' | 'top' | 'right' | 'bottom';
107-
/**
108-
* 透传 SelectInput 筛选器输入框组件的全部属性
109-
*/
110-
selectInputProps?: SelectInputProps;
111102
/**
112103
* 输入框尺寸
113104
* @default medium
@@ -185,11 +176,6 @@ export interface TdDateRangePickerProps {
185176
* @default false
186177
*/
187178
borderless?: boolean;
188-
/**
189-
* 默认的日期选择交互是根据点击前后日期的顺序来决定并且会加以限制。比如:用户先点击开始时间输入框,选择了一个日期例如2020-05-15,紧接着交互会自动将焦点跳到结束日期输入框,等待用户选择结束时间。此时用户只能选择大于2020-05-15的日期(之前的日期会被灰态禁止点击,限制用户的点击)。当该值传递`true`时,则取消该限制
190-
* @default false
191-
*/
192-
cancelRangeSelectLimit?: boolean;
193179
/**
194180
* 是否显示清除按钮
195181
* @default false
@@ -238,11 +224,6 @@ export interface TdDateRangePickerProps {
238224
* @default date
239225
*/
240226
mode?: 'year' | 'quarter' | 'month' | 'week' | 'date';
241-
/**
242-
* 决定在日期时间区间选择器的场景下是否需要点击确认按钮才完成选择动作,默认为 `true`
243-
* @default true
244-
*/
245-
needConfirm?: boolean;
246227
/**
247228
* 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期
248229
* @default true
@@ -367,7 +348,6 @@ export interface TdDatePickerPanelProps
367348
| 'presets'
368349
| 'presetsPlacement'
369350
| 'timePickerProps'
370-
| 'needConfirm'
371351
> {
372352
/**
373353
* 时间选择器默认值,当 value/defaultValue 未设置值时有效

0 commit comments

Comments
 (0)