You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/date-picker/index.js

28 lines
1.1 KiB

7 years ago
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'
7 years ago
import { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './interface'
7 years ago
const DatePicker = wrapPicker({ ...createPicker(VcCalendar, DatePickerProps()), name: 'ADatePicker' }, DatePickerProps())
7 years ago
const MonthPicker = wrapPicker({ ...createPicker(MonthCalendar, MonthPickerProps()), name: 'AMonthPicker' }, MonthPickerProps(), 'YYYY-MM')
7 years ago
Object.assign(DatePicker, {
7 years ago
RangePicker: wrapPicker(RangePicker, RangePickerProps()),
7 years ago
MonthPicker,
7 years ago
WeekPicker: wrapPicker(WeekPicker, WeekPickerProps(), 'gggg-wo'),
7 years ago
})
/* istanbul ignore next */
DatePicker.install = function (Vue) {
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)
}
7 years ago
export default DatePicker