Browse Source

fix: update ts

pull/1236/head
tangjinzhou 5 years ago
parent
commit
b2e9baa22f
  1. 4
      components/config-provider/index.jsx
  2. 10
      types/config-provider.d.ts
  3. 19
      types/locale-provider.d.ts

4
components/config-provider/index.jsx

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

10
types/config-provider.d.ts vendored

@ -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;
}

19
types/locale-provider.d.ts vendored

@ -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/

Loading…
Cancel
Save