Browse Source

fix: moment ts error

pull/3128/head
tangjinzhou 4 years ago
parent
commit
6a16e19b37
  1. 1
      components/calendar/Header.tsx
  2. 1
      components/date-picker/props.ts
  3. 2
      components/date-picker/utils.ts

1
components/calendar/Header.tsx

@ -4,6 +4,7 @@ import { Group, Button } from '../radio';
import PropTypes from '../_util/vue-types';
import { defaultConfigProvider } from '../config-provider';
import { VueNode } from '../_util/type';
import moment from 'moment';
function getMonthsLocale(value: moment.Moment): string[] {
const current = value.clone();

1
components/date-picker/props.ts

@ -1,4 +1,5 @@
import { PropType } from 'vue';
import moment from 'moment';
import PropTypes, { withUndefined } from '../_util/vue-types';
import { tuple } from '../_util/type';

2
components/date-picker/utils.ts

@ -1,3 +1,5 @@
import moment from 'moment';
type Value = moment.Moment | undefined | null;
type Format = string | string[] | undefined | ((val?: Value) => string | string[] | undefined);
export function formatDate(value: Value, format: Format) {

Loading…
Cancel
Save