From b75ca5c163418dac0b1196b2bc32d12675c727ed Mon Sep 17 00:00:00 2001 From: Kyrielin Date: Thu, 19 May 2022 20:04:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20datepicker=20=E6=94=AF=E6=8C=81=20onCha?= =?UTF-8?q?nge=20=E8=BF=94=E5=9B=9E=20trigger=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E4=BA=8B=E4=BB=B6=E8=A7=A6=E5=8F=91=E6=BA=90?= =?UTF-8?q?=20(#777)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/date-picker/DatePicker.tsx | 11 ++- src/date-picker/DateRangePicker.tsx | 24 +++--- .../__snapshots__/date-picker.test.tsx.snap | 44 +++++++++++ src/date-picker/_example/disable-date.jsx | 78 +++++++++++-------- src/date-picker/date-picker.md | 5 +- src/date-picker/hooks/useRange.tsx | 10 +-- src/date-picker/hooks/useSingle.tsx | 4 +- src/date-picker/type.ts | 10 ++- test/ssr/__snapshots__/ssr.test.js.snap | 64 ++++----------- 9 files changed, 145 insertions(+), 105 deletions(-) diff --git a/src/date-picker/DatePicker.tsx b/src/date-picker/DatePicker.tsx index 233f28b12..e772852b2 100644 --- a/src/date-picker/DatePicker.tsx +++ b/src/date-picker/DatePicker.tsx @@ -26,6 +26,7 @@ const DatePicker = forwardRef((props, ref) => { firstDayOfWeek = globalDatePickerConfig.firstDayOfWeek, presets, timePickerProps, + onPick, } = props; const { @@ -91,9 +92,11 @@ const DatePicker = forwardRef((props, ref) => { if (enableTimePicker) { setCacheValue(formatDate(date)); } else { - onChange(formatDate(date, 'valueType'), dayjs(date)); + onChange(formatDate(date, 'valueType'), { dayjsValue: dayjs(date), trigger: 'pick' }); setPopupVisible(false); } + + onPick?.(date); } // 头部快速切换 @@ -139,13 +142,15 @@ const DatePicker = forwardRef((props, ref) => { const currentDate = !dayjs(inputValue, format).isValid() ? dayjs() : dayjs(inputValue, format); const nextDate = currentDate.hour(nextHours).minute(minutes).second(seconds).millisecond(milliseconds).toDate(); setInputValue(formatDate(nextDate)); + + onPick?.(nextDate); } // 确定 function onConfirmClick() { const nextValue = formatDate(inputValue); if (nextValue) { - onChange(formatDate(inputValue, 'valueType'), dayjs(inputValue)); + onChange(formatDate(inputValue, 'valueType'), { dayjsValue: dayjs(inputValue), trigger: 'confirm' }); } else { setInputValue(formatDate(value)); } @@ -158,7 +163,7 @@ const DatePicker = forwardRef((props, ref) => { if (typeof preset === 'function') { presetValue = preset(); } - onChange(formatDate(presetValue, 'valueType'), dayjs(presetValue)); + onChange(formatDate(presetValue, 'valueType'), { dayjsValue: dayjs(presetValue), trigger: 'preset' }); setPopupVisible(false); } diff --git a/src/date-picker/DateRangePicker.tsx b/src/date-picker/DateRangePicker.tsx index 73c8a606a..4430f17af 100644 --- a/src/date-picker/DateRangePicker.tsx +++ b/src/date-picker/DateRangePicker.tsx @@ -122,10 +122,10 @@ const DateRangePicker = forwardRef((props, // 首次点击不关闭、确保两端都有有效值并且无时间选择器时点击后自动关闭 if (notValidIndex === -1 && nextValue.length === 2 && !enableTimePicker && isFirstValueSelected) { - onChange( - formatDate(nextValue, 'valueType'), - nextValue.map((v) => dayjs(v)), - ); + onChange(formatDate(nextValue, 'valueType'), { + dayjsValue: nextValue.map((v) => dayjs(v)), + trigger: 'pick', + }); setIsFirstValueSelected(false); setPopupVisible(false); } else if (notValidIndex !== -1) { @@ -216,10 +216,10 @@ const DateRangePicker = forwardRef((props, // 首次点击不关闭、确保两端都有有效值并且无时间选择器时点击后自动关闭 if (notValidIndex === -1 && nextValue.length === 2 && isFirstValueSelected) { - onChange( - formatDate(nextValue, 'valueType'), - nextValue.map((v) => dayjs(v)), - ); + onChange(formatDate(nextValue, 'valueType'), { + dayjsValue: nextValue.map((v) => dayjs(v)), + trigger: 'confirm', + }); setYear(nextValue.map((v) => dayjs(v, format).year())); setMonth(nextValue.map((v) => dayjs(v, format).month())); setPopupVisible(false); @@ -242,10 +242,10 @@ const DateRangePicker = forwardRef((props, if (!Array.isArray(presetValue)) { console.error(`preset: ${preset} 预设值必须是数组!`); } else { - onChange( - formatDate(presetValue, 'valueType'), - presetValue.map((p) => dayjs(p)), - ); + onChange(formatDate(presetValue, 'valueType'), { + dayjsValue: presetValue.map((p) => dayjs(p)), + trigger: 'preset', + }); setPopupVisible(false); } } diff --git a/src/date-picker/__tests__/__snapshots__/date-picker.test.tsx.snap b/src/date-picker/__tests__/__snapshots__/date-picker.test.tsx.snap index fb14925ca..4350b74d8 100644 --- a/src/date-picker/__tests__/__snapshots__/date-picker.test.tsx.snap +++ b/src/date-picker/__tests__/__snapshots__/date-picker.test.tsx.snap @@ -810,6 +810,50 @@ exports[`disable-date.jsx 1`] = ` +
+
+
+
+
+ + + + + + +
+
+
+
diff --git a/src/date-picker/_example/disable-date.jsx b/src/date-picker/_example/disable-date.jsx index 272d2c454..b4b3563fe 100644 --- a/src/date-picker/_example/disable-date.jsx +++ b/src/date-picker/_example/disable-date.jsx @@ -1,42 +1,58 @@ -import React, { useState } from 'react'; +import React, { useState, useMemo } from 'react'; import dayjs from 'dayjs'; import { DatePicker, DateRangePicker } from 'tdesign-react'; export default function YearDatePicker() { - // 禁用昨天、前天 - const [disableDate] = useState([dayjs().subtract(1, 'day').format(), dayjs().subtract(2, 'day').format()]); - // 禁用最近 3 天外的日期 - const [disableDate2] = useState({ - before: dayjs().subtract(3, 'day').format(), - after: dayjs().add(3, 'day').format(), - }); - // 明后三天禁用 - const [disableDate3] = useState({ - from: dayjs().add(1, 'day').format(), - to: dayjs().add(3, 'day').format(), - }); - // 只可选择最近 5 天内的日期 - const [disableDate4] = useState({ - before: dayjs().subtract(5, 'day').format(), - after: dayjs().add(5, 'day').format(), - }); + const [pickDate, setPickDate] = useState(); - // 禁用所有周六 - function getDisableDate(date) { - return dayjs(date).day() === 6; - } - - function handleChange(value) { - console.log(value); - } + const timePickerProps = useMemo(() => { + return { + disableTime: () => { + if (pickDate === dayjs().format('YYYY-MM-DD')) { + return { + hour: [0, 1, 2, 3, 4, 5, 6], + }; + } + return {}; + }, + }; + }, [pickDate]); return (
- - - - - + + + dayjs(date).day() === 6} /> + + setPickDate(dayjs(date).format('YYYY-MM-DD'))} + /> +
); } diff --git a/src/date-picker/date-picker.md b/src/date-picker/date-picker.md index ad015fc6a..4e469b718 100644 --- a/src/date-picker/date-picker.md +++ b/src/date-picker/date-picker.md @@ -28,9 +28,10 @@ value | String / Number / Array / Date | - | 选中值。TS 类型:`DateValue` defaultValue | String / Number / Array / Date | - | 选中值。非受控属性。TS 类型:`DateValue` `type DateValue = string | number | Date`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N valueType | String | YYYY-MM-DD | 用于格式化日期,默认为:'YYYY-MM-DD',可选值:'date/time-stamp/YYY-MM-DD' 等,[更多可选值见 Dayjs 详细文档](https://day.js.org/docs/en/display/format)。
其中 `valueType=date` 表示 `value` 数据类型为 `Date`;`valueType='time-stamp'` 表示 `value` 数据类型为时间戳 | N onBlur | Function | | TS 类型:`(context: { value: DateValue; e: FocusEvent }) => void`
当输入框失去焦点时触发 | N -onChange | Function | | TS 类型:`(value: DateValue, dayjsValue: Dayjs) => void`
选中值发生变化时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts)。
`import { Dayjs } from 'dayjs'`
| N +onChange | Function | | TS 类型:`(value: DateValue, context: { dayjsValue?: Dayjs, trigger?: DatePickerTriggerSource }) => void`
选中值发生变化时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts)。
`import { Dayjs } from 'dayjs'`

`type DatePickerTriggerSource = 'confirm' | 'pick' | 'enter' | 'preset' | 'clear'`
| N onFocus | Function | | TS 类型:`(context: { value: DateValue; e: FocusEvent }) => void`
输入框获得焦点时触发 | N onInput | Function | | TS 类型:`(context: { input: string; value: DateValue; e: InputEvent }) => void`
输入框数据发生变化时触发,参数 input 表示输入内容,value 表示组件当前有效值 | N +onPick | Function | | TS 类型:`(value: DateValue) => void`
面板选中值后触发 | N ### DateRangePicker Props @@ -60,7 +61,7 @@ value | Array | - | 选中值。TS 类型:`DateRangeValue` `type DateRangeValu defaultValue | Array | - | 选中值。非受控属性。TS 类型:`DateRangeValue` `type DateRangeValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts) | N valueType | String | YYYY-MM-DD | 用于格式化日期,默认为:'YYYY-MM-DD',可选值:'date/time-stamp/YYY-MM-DD' 等,[更多可选值见 Dayjs 详细文档](https://day.js.org/docs/en/display/format)。
其中 `valueType=date` 表示 `value` 数据类型为 `Date`;`valueType='time-stamp'` 表示 `value` 数据类型为时间戳 | N onBlur | Function | | TS 类型:`(context: { value: DateRangeValue; partial: DateRangePickerPartial; e: FocusEvent }) => void`
当输入框失去焦点时触发 | N -onChange | Function | | TS 类型:`(value: DateRangeValue, dayjsValue: Dayjs[]) => void`
选中值发生变化时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts)。
`import { Dayjs } from 'dayjs'`
| N +onChange | Function | | TS 类型:`(value: DateRangeValue, context: { dayjsValue?: Dayjs[], trigger?: DatePickerTriggerSource }) => void`
选中值发生变化时触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts)。
`import { Dayjs } from 'dayjs'`
| N onFocus | Function | | TS 类型:`(context: { value: DateRangeValue; partial: DateRangePickerPartial; e: FocusEvent }) => void`
输入框获得焦点时触发 | N onInput | Function | | TS 类型:`(context: { input: string; value: DateRangeValue; partial: DateRangePickerPartial; e: InputEvent }) => void`
输入框数据发生变化时触发,参数 input 表示输入内容,value 表示组件当前有效值 | N onPick | Function | | TS 类型:`(value: DateValue, context: PickContext) => void`
选中日期时触发,可能是开始日期,也可能是结束日期,第二个参数可以区分是开始日期或是结束日期。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/date-picker/type.ts)。
`interface PickContext { e: MouseEvent; partial: DateRangePickerPartial }`
| N diff --git a/src/date-picker/hooks/useRange.tsx b/src/date-picker/hooks/useRange.tsx index a41a6531e..e34dd8d75 100644 --- a/src/date-picker/hooks/useRange.tsx +++ b/src/date-picker/hooks/useRange.tsx @@ -104,7 +104,7 @@ export default function useRange(props: TdDateRangePickerProps) { onClear: ({ e }) => { e.stopPropagation(); setPopupVisible(false); - onChange([], []); + onChange([], { dayjsValue: [], trigger: 'clear' }); }, onBlur: (newVal: string[], { e, position }) => { onBlur?.({ value: newVal, partial: PARTIAL_MAP[position], e }); @@ -138,10 +138,10 @@ export default function useRange(props: TdDateRangePickerProps) { setPopupVisible(false); if (isValidDate(newVal)) { - onChange( - formatDate(newVal, 'valueType') as DateValue[], - newVal.map((v) => dayjs(v)), - ); + onChange(formatDate(newVal, 'valueType') as DateValue[], { + dayjsValue: newVal.map((v) => dayjs(v)), + trigger: 'enter', + }); } else if (isValidDate(value)) { setInputValue(formatDate(value)); } else { diff --git a/src/date-picker/hooks/useSingle.tsx b/src/date-picker/hooks/useSingle.tsx index 485734fb9..e94679af2 100644 --- a/src/date-picker/hooks/useSingle.tsx +++ b/src/date-picker/hooks/useSingle.tsx @@ -60,7 +60,7 @@ export default function useSingle(props: TdDatePickerProps) { onClear: ({ e }) => { e.stopPropagation(); setPopupVisible(false); - onChange('', dayjs('')); + onChange('', { dayjsValue: dayjs(''), trigger: 'clear' }); }, onBlur: (val: string, { e }) => { onBlur?.({ value: val, e }); @@ -88,7 +88,7 @@ export default function useSingle(props: TdDatePickerProps) { setPopupVisible(false); if (isValidDate(val)) { - onChange(formatDate(val, 'valueType') as DateValue, dayjs(val)); + onChange(formatDate(val, 'valueType') as DateValue, { dayjsValue: dayjs(val), trigger: 'enter' }); } else if (isValidDate(value)) { setInputValue(formatDate(value)); } else { diff --git a/src/date-picker/type.ts b/src/date-picker/type.ts index db68a16d2..eabcbfc1f 100644 --- a/src/date-picker/type.ts +++ b/src/date-picker/type.ts @@ -108,7 +108,7 @@ export interface TdDatePickerProps { /** * 选中值发生变化时触发 */ - onChange?: (value: DateValue, dayjsValue: Dayjs) => void; + onChange?: (value: DateValue, context: { dayjsValue?: Dayjs; trigger?: DatePickerTriggerSource }) => void; /** * 输入框获得焦点时触发 */ @@ -117,6 +117,10 @@ export interface TdDatePickerProps { * 输入框数据发生变化时触发,参数 input 表示输入内容,value 表示组件当前有效值 */ onInput?: (context: { input: string; value: DateValue; e: FormEvent }) => void; + /** + * 面板选中值后触发 + */ + onPick?: (value: DateValue) => void; } export interface TdDateRangePickerProps { @@ -216,7 +220,7 @@ export interface TdDateRangePickerProps { /** * 选中值发生变化时触发 */ - onChange?: (value: DateRangeValue, dayjsValue: Dayjs[]) => void; + onChange?: (value: DateRangeValue, context: { dayjsValue?: Dayjs[]; trigger?: DatePickerTriggerSource }) => void; /** * 输入框获得焦点时触发 */ @@ -255,6 +259,8 @@ export interface PresetDate { export type DateValue = string | number | Date; +export type DatePickerTriggerSource = 'confirm' | 'pick' | 'enter' | 'preset' | 'clear'; + export type DisableRangeDate = | Array | DisableDateObj diff --git a/test/ssr/__snapshots__/ssr.test.js.snap b/test/ssr/__snapshots__/ssr.test.js.snap index 72ef86647..b66d307be 100644 --- a/test/ssr/__snapshots__/ssr.test.js.snap +++ b/test/ssr/__snapshots__/ssr.test.js.snap @@ -92,67 +92,35 @@ exports[`ssr snapshot test renders ./src/button/_example/status.jsx correctly 1` exports[`ssr snapshot test renders ./src/button/_example/theme.jsx correctly 1`] = `"
"`; -<<<<<<< HEAD -exports[`ssr snapshot test renders ./src/calendar/_example/base.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/base.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/card.jsx correctly 1`] = `"
请选择
请选择
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/card.jsx correctly 1`] = `"
请选择
请选择
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/cell.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/cell.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/cell-append.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
今天
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/cell-append.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
今天
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/controller-config.jsx correctly 1`] = `"
控件全局



控件局部






请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/controller-config.jsx correctly 1`] = `"
控件全局



控件局部






请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/event-props-api.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
暂无数据,您可以点击一下日历的单元格看看 :)
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/event-props-api.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
暂无数据,您可以点击一下日历的单元格看看 :)
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/events.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/events.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/filter.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/filter.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/first-day-of-week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/first-day-of-week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/head.jsx correctly 1`] = `"
🗓 TDesign开发计划
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/head.jsx correctly 1`] = `"
🗓 TDesign开发计划
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/mode.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/mode.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/range.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/range.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/slot-props-api.jsx correctly 1`] = `"
2021-12 工作安排
请选择
请选择
隐藏周末
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/slot-props-api.jsx correctly 1`] = `"
2021-12 工作安排
请选择
请选择
隐藏周末
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/value.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
"`; +exports[`ssr snapshot test renders ./src/calendar/_example/value.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
01
02
03
04
05
"`; -exports[`ssr snapshot test renders ./src/calendar/_example/week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
星期1
星期2
星期3
星期4
星期5
星期6
星期7
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
;
"`; -======= -exports[`ssr snapshot test renders ./src/calendar/_example/base.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/card.jsx correctly 1`] = `"
请选择
请选择
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/cell.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/cell-append.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
今天
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/controller-config.jsx correctly 1`] = `"
控件全局



控件局部






请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/event-props-api.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
暂无数据,您可以点击一下日历的单元格看看 :)
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/events.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/filter.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/first-day-of-week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/head.jsx correctly 1`] = `"
🗓 TDesign开发计划
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/mode.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/range.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/slot-props-api.jsx correctly 1`] = `"
2021-12 工作安排
请选择
请选择
隐藏周末
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
错误事件
警告事件
正常事件
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/value.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
01
02
03
04
05
"`; - -exports[`ssr snapshot test renders ./src/calendar/_example/week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
;
"`; ->>>>>>> a4d4681f (feat: 统一全局受控 hooks & 优化组件初始值设置) +exports[`ssr snapshot test renders ./src/calendar/_example/week.jsx correctly 1`] = `"
请选择
请选择
隐藏周末
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
01
02
03
04
;
"`; exports[`ssr snapshot test renders ./src/card/_example/base.jsx correctly 1`] = `"
标题
操作
仅有内容区域的卡片形式。卡片内容区域可以是文字、图片、表单、表格等形式信息内容。可使用大中小不同的卡片尺寸,按业务需求进行呈现。
"`; @@ -268,7 +236,7 @@ exports[`ssr snapshot test renders ./src/date-picker/_example/date-range.jsx cor exports[`ssr snapshot test renders ./src/date-picker/_example/date-time.jsx correctly 1`] = `"
"`; -exports[`ssr snapshot test renders ./src/date-picker/_example/disable-date.jsx correctly 1`] = `"
-
"`; +exports[`ssr snapshot test renders ./src/date-picker/_example/disable-date.jsx correctly 1`] = `"
-
"`; exports[`ssr snapshot test renders ./src/date-picker/_example/first-day-of-week.jsx correctly 1`] = `"
"`;