fix: update ts

pull/1236/head
tangjinzhou 2019-09-26 22:05:24 +08:00
parent 2c63715c5a
commit b2e9baa22f
3 changed files with 31 additions and 2 deletions

View File

@ -19,8 +19,8 @@ const ConfigProvider = {
props: {
getPopupContainer: PropTypes.func,
prefixCls: PropTypes.string,
renderEmpty: PropTypes.any,
csp: PropTypes.any,
renderEmpty: PropTypes.func,
csp: PropTypes.object,
autoInsertSpaceInButton: PropTypes.bool,
},
provide() {

View File

@ -1,5 +1,15 @@
import { AntdComponent } from './component';
import { Locale } from './locale-provider'
export interface CSPConfig {
nonce?: string;
}
export declare class ConfigProvider extends AntdComponent {
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
getPrefixCls: (suffixCls: string, customizePrefixCls?: string) => string;
renderEmpty: Function;
csp?: CSPConfig;
autoInsertSpaceInButton?: boolean;
}

View File

@ -4,6 +4,25 @@
import { AntdComponent } from './component';
export interface ModalLocale {
okText: string;
cancelText: string;
justOkText: string;
}
export interface Locale {
locale: string;
Pagination?: Object;
DatePicker?: Object;
TimePicker?: Object;
Calendar?: Object;
Table?: Object;
Modal?: ModalLocale;
Popconfirm?: Object;
Transfer?: Object;
Select?: Object;
Upload?: Object;
}
export declare class LocaleProvider extends AntdComponent {
/**
* language package setting, you can find the packages in this path: antd/lib/locale-provider/