mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
test: fix CI
This commit is contained in:
parent
9181db8a01
commit
67be1eafa9
@ -120,6 +120,11 @@ export default class Calendar extends React.Component<CalendarProps, CalendarSta
|
||||
);
|
||||
}
|
||||
|
||||
getDefaultLocale() {
|
||||
const locale = require('./locale/en_US');
|
||||
return locale.default || locale;
|
||||
}
|
||||
|
||||
setValue = (value, way: 'select' | 'changePanel') => {
|
||||
if (!('value' in this.props)) {
|
||||
this.setState({ value });
|
||||
@ -208,7 +213,7 @@ export default class Calendar extends React.Component<CalendarProps, CalendarSta
|
||||
return (
|
||||
<LocaleReceiver
|
||||
componentName="Calendar"
|
||||
defaultLocale={() => require('./locale/en_US')}
|
||||
defaultLocale={this.getDefaultLocale}
|
||||
>
|
||||
{this.renderCalendar}
|
||||
</LocaleReceiver>
|
||||
|
@ -54,6 +54,11 @@ export default function wrapPicker(Picker, defaultFormat?: string): any {
|
||||
}
|
||||
}
|
||||
|
||||
getDefaultLocale() {
|
||||
const locale = require('./locale/en_US');
|
||||
return locale.default || locale;
|
||||
}
|
||||
|
||||
renderPicker = (locale, localeCode) => {
|
||||
const props = this.props;
|
||||
const { prefixCls, inputPrefixCls } = props;
|
||||
@ -102,7 +107,7 @@ export default function wrapPicker(Picker, defaultFormat?: string): any {
|
||||
return (
|
||||
<LocaleReceiver
|
||||
componentName="DatePicker"
|
||||
defaultLocale={() => require('./locale/en_US')}
|
||||
defaultLocale={this.getDefaultLocale}
|
||||
>
|
||||
{this.renderPicker}
|
||||
</LocaleReceiver>
|
||||
|
Loading…
Reference in New Issue
Block a user