Skip to content

Commit bba3227

Browse files
committed
fix: ts error
1 parent 144bb2e commit bba3227

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

components/calendar/generateCalendar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function generateCalendar<
8686
);
8787
}
8888

89-
const Calendar = defineComponent({
89+
const Calendar = defineComponent<Props>({
9090
name: 'ACalendar',
9191
inheritAttrs: false,
9292
props: {
@@ -120,7 +120,7 @@ function generateCalendar<
120120
onPanelChange: { type: Function as PropType<Props['onPanelChange']>, default: undefined },
121121
onSelect: { type: Function as PropType<Props['onSelect']>, default: undefined },
122122
valueFormat: { type: String, default: undefined },
123-
},
123+
} as any,
124124
slots: Object as CustomSlotsType<{
125125
dateFullCellRender?: { current: DateType };
126126
dateCellRender?: { current: DateType };

components/time-picker/time-picker.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ function createTimePicker<
8585
});
8686

8787
const { TimePicker: InternalTimePicker, RangePicker: InternalRangePicker } = DatePicker as any;
88-
const TimePicker = defineComponent({
88+
const TimePicker = defineComponent<DTimePickerProps>({
8989
name: 'ATimePicker',
9090
inheritAttrs: false,
9191
props: {
92-
...commonProps<DateType>(),
93-
...datePickerProps<DateType>(),
92+
...commonProps<any>(),
93+
...datePickerProps<any>(),
9494
...timePickerProps(),
9595
addon: { type: Function },
96-
},
96+
} as any,
9797
slots: Object as CustomSlotsType<{
9898
addon?: any;
9999
renderExtraFooter?: any;
@@ -163,15 +163,15 @@ function createTimePicker<
163163
},
164164
});
165165

166-
const TimeRangePicker = defineComponent({
166+
const TimeRangePicker = defineComponent<DTimeRangePickerProps>({
167167
name: 'ATimeRangePicker',
168168
inheritAttrs: false,
169169
props: {
170-
...commonProps<DateType>(),
171-
...rangePickerProps<DateType>(),
170+
...commonProps<any>(),
171+
...rangePickerProps<any>(),
172172
...timePickerProps(),
173173
order: { type: Boolean, default: true },
174-
},
174+
} as any,
175175
slots: Object as CustomSlotsType<{
176176
renderExtraFooter?: any;
177177
suffixIcon?: any;

0 commit comments

Comments
 (0)