mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 09:21:25 +08:00
da0f17d1b6
# Conflicts: # components/affix/index.jsx # components/alert/index.jsx # components/back-top/index.jsx # components/carousel/index.jsx # components/cascader/index.jsx # components/comment/index.jsx # components/config-provider/index.jsx # components/divider/index.jsx # components/drawer/index.jsx # components/form/Form.jsx # components/input-number/index.jsx # components/menu/index.jsx # components/modal/confirm.js # components/modal/index.js # components/popconfirm/index.jsx # components/popover/index.jsx # components/rate/index.jsx # components/steps/index.jsx # components/switch/index.jsx # components/time-picker/index.jsx # components/tree-select/index.jsx # site/components.js
38 lines
1.2 KiB
JavaScript
Executable File
38 lines
1.2 KiB
JavaScript
Executable File
import VcCalendar from '../vc-calendar';
|
|
import MonthCalendar from '../vc-calendar/src/MonthCalendar';
|
|
import createPicker from './createPicker';
|
|
import wrapPicker from './wrapPicker';
|
|
import RangePicker from './RangePicker';
|
|
import WeekPicker from './WeekPicker';
|
|
import { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './interface';
|
|
import Base from '../base';
|
|
|
|
const DatePicker = wrapPicker(
|
|
{ ...createPicker(VcCalendar, DatePickerProps()), name: 'ADatePicker' },
|
|
DatePickerProps(),
|
|
'date',
|
|
);
|
|
|
|
const MonthPicker = wrapPicker(
|
|
{ ...createPicker(MonthCalendar, MonthPickerProps()), name: 'AMonthPicker' },
|
|
MonthPickerProps(),
|
|
'month',
|
|
);
|
|
|
|
Object.assign(DatePicker, {
|
|
RangePicker: wrapPicker(RangePicker, RangePickerProps(), 'date'),
|
|
MonthPicker,
|
|
WeekPicker: wrapPicker(WeekPicker, WeekPickerProps(), 'week'),
|
|
});
|
|
|
|
/* istanbul ignore next */
|
|
DatePicker.install = function(Vue) {
|
|
Vue.use(Base);
|
|
Vue.component(DatePicker.name, DatePicker);
|
|
Vue.component(DatePicker.RangePicker.name, DatePicker.RangePicker);
|
|
Vue.component(DatePicker.MonthPicker.name, DatePicker.MonthPicker);
|
|
Vue.component(DatePicker.WeekPicker.name, DatePicker.WeekPicker);
|
|
};
|
|
|
|
export default DatePicker;
|