amis-rpc-design/node_modules/antd/es/date-picker/generatePicker/index.js

30 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use client";
import generateRangePicker from './generateRangePicker';
import generateSinglePicker from './generateSinglePicker';
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];
function generatePicker(generateConfig) {
// =========================== Picker ===========================
const {
DatePicker,
WeekPicker,
MonthPicker,
YearPicker,
TimePicker,
QuarterPicker
} = generateSinglePicker(generateConfig);
// ======================== Range Picker ========================
const RangePicker = generateRangePicker(generateConfig);
const MergedDatePicker = DatePicker;
MergedDatePicker.WeekPicker = WeekPicker;
MergedDatePicker.MonthPicker = MonthPicker;
MergedDatePicker.YearPicker = YearPicker;
MergedDatePicker.RangePicker = RangePicker;
MergedDatePicker.TimePicker = TimePicker;
MergedDatePicker.QuarterPicker = QuarterPicker;
if (process.env.NODE_ENV !== 'production') {
MergedDatePicker.displayName = 'DatePicker';
}
return MergedDatePicker;
}
export default generatePicker;