1 |
|
2 |
|
3 | import * as React from 'react';
|
4 |
|
5 | export interface ConfigProviderProps {
|
6 | |
7 |
|
8 |
|
9 | prefix?: string;
|
10 |
|
11 | |
12 |
|
13 |
|
14 | locale?: Record<string, unknown>;
|
15 |
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | errorBoundary?:
|
24 | | boolean
|
25 | | {
|
26 | afterCatch?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
27 | fallbackUI?: (error: Error, errorInfo: React.ErrorInfo) => React.ReactElement<any>;
|
28 | };
|
29 |
|
30 | |
31 |
|
32 |
|
33 | pure?: boolean;
|
34 |
|
35 | |
36 |
|
37 |
|
38 | warning?: boolean;
|
39 |
|
40 | |
41 |
|
42 |
|
43 |
|
44 | rtl?: boolean;
|
45 | |
46 |
|
47 |
|
48 | device?: 'tablet' | 'desktop' | 'phone';
|
49 | |
50 |
|
51 |
|
52 | children?: React.ReactNode;
|
53 | |
54 |
|
55 |
|
56 | popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
|
57 | /**
|
58 | * 组件 API 的默认配置
|
59 | */
|
60 | defaultPropsConfig?: Record<string, any>;
|
61 | }
|
62 |
|
63 | export default class ConfigProvider extends React.Component<ConfigProviderProps, any> {
|
64 | static config(Component: any, options?: any): any;
|
65 | static getContextProps(props: {}, displayName: string): any;
|
66 | static initLocales(locales: any): any;
|
67 | static setLanguage(language: string): any;
|
68 | static setLocale(locale: any): any;
|
69 | static setDirection(dir: string): any;
|
70 | static getLocale(): any;
|
71 | static getLanguage(): string;
|
72 | static getDirection(): string;
|
73 | static clearCache(): any;
|
74 | static Consumer(props: { children: (ctx: ConfigProviderProps) => React.ReactNode }): JSX.Element;
|
75 | }
|
76 |
|
\ | No newline at end of file |