fix: moment ts error

pull/3128/head
tangjinzhou 2020-11-03 22:57:14 +08:00
parent 1165b42dc2
commit 6a16e19b37
3 changed files with 4 additions and 0 deletions

View File

@ -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();

View File

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

View File

@ -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) {