Browse Source

Merge remote-tracking branch 'origin/main' into feat-v4

pull/6588/head 4.0.0-rc.1
tangjinzhou 2 years ago
parent
commit
d49082008e
  1. 4
      components/calendar/generateCalendar.tsx
  2. 16
      components/time-picker/time-picker.tsx

4
components/calendar/generateCalendar.tsx

@ -88,7 +88,7 @@ function generateCalendar<
); );
} }
const Calendar = defineComponent({ const Calendar = defineComponent<Props>({
name: 'ACalendar', name: 'ACalendar',
inheritAttrs: false, inheritAttrs: false,
props: { props: {
@ -122,7 +122,7 @@ function generateCalendar<
onPanelChange: { type: Function as PropType<Props['onPanelChange']>, default: undefined }, onPanelChange: { type: Function as PropType<Props['onPanelChange']>, default: undefined },
onSelect: { type: Function as PropType<Props['onSelect']>, default: undefined }, onSelect: { type: Function as PropType<Props['onSelect']>, default: undefined },
valueFormat: { type: String, default: undefined }, valueFormat: { type: String, default: undefined },
}, } as any,
slots: Object as CustomSlotsType<{ slots: Object as CustomSlotsType<{
dateFullCellRender?: { current: DateType }; dateFullCellRender?: { current: DateType };
dateCellRender?: { current: DateType }; dateCellRender?: { current: DateType };

16
components/time-picker/time-picker.tsx

@ -77,15 +77,15 @@ function createTimePicker<
}); });
const { TimePicker: InternalTimePicker, RangePicker: InternalRangePicker } = DatePicker as any; const { TimePicker: InternalTimePicker, RangePicker: InternalRangePicker } = DatePicker as any;
const TimePicker = defineComponent({ const TimePicker = defineComponent<DTimePickerProps>({
name: 'ATimePicker', name: 'ATimePicker',
inheritAttrs: false, inheritAttrs: false,
props: { props: {
...commonProps<DateType>(), ...commonProps<any>(),
...datePickerProps<DateType>(), ...datePickerProps<any>(),
...timePickerProps(), ...timePickerProps(),
addon: { type: Function }, addon: { type: Function },
}, } as any,
slots: Object as CustomSlotsType<{ slots: Object as CustomSlotsType<{
addon?: any; addon?: any;
renderExtraFooter?: any; renderExtraFooter?: any;
@ -155,15 +155,15 @@ function createTimePicker<
}, },
}); });
const TimeRangePicker = defineComponent({ const TimeRangePicker = defineComponent<DTimeRangePickerProps>({
name: 'ATimeRangePicker', name: 'ATimeRangePicker',
inheritAttrs: false, inheritAttrs: false,
props: { props: {
...commonProps<DateType>(), ...commonProps<any>(),
...rangePickerProps<DateType>(), ...rangePickerProps<any>(),
...timePickerProps(), ...timePickerProps(),
order: { type: Boolean, default: true }, order: { type: Boolean, default: true },
}, } as any,
slots: Object as CustomSlotsType<{ slots: Object as CustomSlotsType<{
renderExtraFooter?: any; renderExtraFooter?: any;
suffixIcon?: any; suffixIcon?: any;

Loading…
Cancel
Save