mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
fix: Upload should work with LocaleProvider (#5388)
This commit is contained in:
parent
35ab3fbf75
commit
c2cb111f7b
@ -7,6 +7,12 @@ import UploadList from './UploadList';
|
||||
import { UploadProps, UploadLocale } from './interface';
|
||||
import { T, fileToObject, genPercentAdd, getFileItem, removeFileItem } from './utils';
|
||||
|
||||
export interface UploadContext {
|
||||
antLocale?: {
|
||||
Upload?: any,
|
||||
};
|
||||
}
|
||||
|
||||
const defaultLocale: UploadLocale = {
|
||||
uploading: '文件上传中',
|
||||
removeFile: '删除文件',
|
||||
@ -34,6 +40,12 @@ export default class Upload extends React.Component<UploadProps, any> {
|
||||
supportServerRender: true,
|
||||
};
|
||||
|
||||
static contextTypes = {
|
||||
antLocale: React.PropTypes.object,
|
||||
};
|
||||
|
||||
context: UploadContext;
|
||||
|
||||
recentUploadStatus: boolean | PromiseLike<any>;
|
||||
progressTimer: any;
|
||||
refs: {
|
||||
|
Loading…
Reference in New Issue
Block a user