From bba322702e4a91b24644b198b482f3e32a305f3c Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 19 May 2023 10:15:07 +0800 Subject: [PATCH] fix: ts error --- components/calendar/generateCalendar.tsx | 4 ++-- components/time-picker/time-picker.tsx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/calendar/generateCalendar.tsx b/components/calendar/generateCalendar.tsx index c3a866da6..9107d5634 100644 --- a/components/calendar/generateCalendar.tsx +++ b/components/calendar/generateCalendar.tsx @@ -86,7 +86,7 @@ function generateCalendar< ); } - const Calendar = defineComponent({ + const Calendar = defineComponent({ name: 'ACalendar', inheritAttrs: false, props: { @@ -120,7 +120,7 @@ function generateCalendar< onPanelChange: { type: Function as PropType, default: undefined }, onSelect: { type: Function as PropType, default: undefined }, valueFormat: { type: String, default: undefined }, - }, + } as any, slots: Object as CustomSlotsType<{ dateFullCellRender?: { current: DateType }; dateCellRender?: { current: DateType }; diff --git a/components/time-picker/time-picker.tsx b/components/time-picker/time-picker.tsx index 33c735247..a3d61ba11 100644 --- a/components/time-picker/time-picker.tsx +++ b/components/time-picker/time-picker.tsx @@ -85,15 +85,15 @@ function createTimePicker< }); const { TimePicker: InternalTimePicker, RangePicker: InternalRangePicker } = DatePicker as any; - const TimePicker = defineComponent({ + const TimePicker = defineComponent({ name: 'ATimePicker', inheritAttrs: false, props: { - ...commonProps(), - ...datePickerProps(), + ...commonProps(), + ...datePickerProps(), ...timePickerProps(), addon: { type: Function }, - }, + } as any, slots: Object as CustomSlotsType<{ addon?: any; renderExtraFooter?: any; @@ -163,15 +163,15 @@ function createTimePicker< }, }); - const TimeRangePicker = defineComponent({ + const TimeRangePicker = defineComponent({ name: 'ATimeRangePicker', inheritAttrs: false, props: { - ...commonProps(), - ...rangePickerProps(), + ...commonProps(), + ...rangePickerProps(), ...timePickerProps(), order: { type: Boolean, default: true }, - }, + } as any, slots: Object as CustomSlotsType<{ renderExtraFooter?: any; suffixIcon?: any;