diff --git a/components/_util/callMoment.js b/components/_util/callMoment.js deleted file mode 100644 index 3bb9a981d..000000000 --- a/components/_util/callMoment.js +++ /dev/null @@ -1,4 +0,0 @@ -// https://github.com/moment/moment/issues/3650 -export default function callMoment(moment, ...args) { - return (moment.default || moment)(...args); -} diff --git a/components/_util/moment-util.js b/components/_util/moment-util.js index 163effc36..bef4bf250 100644 --- a/components/_util/moment-util.js +++ b/components/_util/moment-util.js @@ -1,5 +1,5 @@ import interopDefault from './interopDefault'; -import * as moment from 'moment'; +import moment from 'moment'; import warning from './warning'; import isNil from 'lodash/isNil'; diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx index 5f0d23176..97a3ee6d0 100644 --- a/components/calendar/index.jsx +++ b/components/calendar/index.jsx @@ -2,7 +2,7 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; import BaseMixin from '../_util/BaseMixin'; import { getOptionProps, hasProp, initDefaultProps } from '../_util/props-util'; -import * as moment from 'moment'; +import moment from 'moment'; import FullCalendar from '../vc-calendar/src/FullCalendar'; import Header from './Header'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 757468e32..f9cee2e60 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import * as moment from 'moment'; +import moment from 'moment'; import RangeCalendar from '../vc-calendar/src/RangeCalendar'; import VcDatePicker from '../vc-calendar/src/Picker'; import classNames from '../_util/classNames'; diff --git a/components/date-picker/WeekPicker.jsx b/components/date-picker/WeekPicker.jsx index d6de7e811..0836b6492 100644 --- a/components/date-picker/WeekPicker.jsx +++ b/components/date-picker/WeekPicker.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import * as moment from 'moment'; +import moment from 'moment'; import Calendar from '../vc-calendar'; import VcDatePicker from '../vc-calendar/src/Picker'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; diff --git a/components/date-picker/createPicker.js b/components/date-picker/createPicker.js index 44468841e..f59427edc 100644 --- a/components/date-picker/createPicker.js +++ b/components/date-picker/createPicker.js @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import * as moment from 'moment'; +import moment from 'moment'; import omit from 'lodash/omit'; import MonthCalendar from '../vc-calendar/src/MonthCalendar'; import VcDatePicker from '../vc-calendar/src/Picker'; diff --git a/components/locale-provider/index.jsx b/components/locale-provider/index.jsx index fa7787aca..d5331cace 100644 --- a/components/locale-provider/index.jsx +++ b/components/locale-provider/index.jsx @@ -1,6 +1,6 @@ import { provide } from 'vue'; import PropTypes from '../_util/vue-types'; -import * as moment from 'moment'; +import moment from 'moment'; import interopDefault from '../_util/interopDefault'; import { changeConfirmLocale } from '../modal/locale'; import warning from '../_util/warning'; diff --git a/components/statistic/Countdown.jsx b/components/statistic/Countdown.jsx index 3f5c21c4f..5964383d8 100644 --- a/components/statistic/Countdown.jsx +++ b/components/statistic/Countdown.jsx @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; import interopDefault from '../_util/interopDefault'; import { initDefaultProps } from '../_util/props-util'; import Statistic, { StatisticProps } from './Statistic'; diff --git a/components/statistic/utils.js b/components/statistic/utils.js index 25e6be2d7..0bb971480 100644 --- a/components/statistic/utils.js +++ b/components/statistic/utils.js @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; import padStart from 'lodash/padStart'; import interopDefault from '../_util/interopDefault'; diff --git a/examples/App.vue b/examples/App.vue index d01cc683f..6e9152151 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -15,7 +15,7 @@ Use Drawer to quickly preview details of an object, such as those in a list.