@flatbiz/pro-layout 4.0.12 → 4.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/index.d.ts +66 -0
- package/package.json +5 -3
package/index.d.ts
CHANGED
|
@@ -295,6 +295,72 @@ export interface PageProps {
|
|
|
295
295
|
children?: ReactElement | ReactElement[];
|
|
296
296
|
}
|
|
297
297
|
export declare const Page: (props: PageProps) => JSX.Element;
|
|
298
|
+
export interface PageProps {
|
|
299
|
+
loading?: boolean;
|
|
300
|
+
className?: string;
|
|
301
|
+
style?: CSSProperties;
|
|
302
|
+
fullIndex?: number;
|
|
303
|
+
bread?: JSX.Element;
|
|
304
|
+
children?: ReactElement | ReactElement[];
|
|
305
|
+
}
|
|
306
|
+
export interface PageProps {
|
|
307
|
+
loading?: boolean;
|
|
308
|
+
className?: string;
|
|
309
|
+
style?: CSSProperties;
|
|
310
|
+
fullIndex?: number;
|
|
311
|
+
bread?: JSX.Element;
|
|
312
|
+
children?: ReactElement | ReactElement[];
|
|
313
|
+
}
|
|
314
|
+
export interface PageProps {
|
|
315
|
+
loading?: boolean;
|
|
316
|
+
className?: string;
|
|
317
|
+
style?: CSSProperties;
|
|
318
|
+
fullIndex?: number;
|
|
319
|
+
bread?: JSX.Element;
|
|
320
|
+
children?: ReactElement | ReactElement[];
|
|
321
|
+
}
|
|
322
|
+
export interface PageProps {
|
|
323
|
+
loading?: boolean;
|
|
324
|
+
className?: string;
|
|
325
|
+
style?: CSSProperties;
|
|
326
|
+
fullIndex?: number;
|
|
327
|
+
bread?: JSX.Element;
|
|
328
|
+
children?: ReactElement | ReactElement[];
|
|
329
|
+
}
|
|
330
|
+
export type TAny = any;
|
|
331
|
+
export type TPlainObject<T = TAny> = Record<string, T>;
|
|
332
|
+
export type PageWrapperServiceConfig = {
|
|
333
|
+
onRequest: (params?: TAny) => Promise<TPlainObject>;
|
|
334
|
+
params?: TPlainObject;
|
|
335
|
+
};
|
|
336
|
+
export interface PageWrapperProps extends Omit<PageProps, "children"> {
|
|
337
|
+
/** 接口数据配置 */
|
|
338
|
+
serviceConfig: PageWrapperServiceConfig;
|
|
339
|
+
/** children 为函数,参数【respData】为接口返回数据 */
|
|
340
|
+
children?: (respData?: TAny) => ReactElement;
|
|
341
|
+
/**
|
|
342
|
+
* 是否异步,默认:false
|
|
343
|
+
* ```
|
|
344
|
+
* true(异步):onRequest、react dom渲染同步执行
|
|
345
|
+
* false(同步):onRequest有结果了才渲染 react dom
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
isAsync?: boolean;
|
|
349
|
+
/** 自定义异常渲染处理 */
|
|
350
|
+
errorRender?: (error?: TAny) => ReactElement;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* 为Page内置接口处理流程组件,如果无全局初始化接口请求场景,请使用Page组件
|
|
354
|
+
* ```
|
|
355
|
+
* 包括
|
|
356
|
+
* 1. loading显示效果
|
|
357
|
+
* 2. error显示效果
|
|
358
|
+
* 3. 正常接口数据渲染
|
|
359
|
+
* ```
|
|
360
|
+
* @param props
|
|
361
|
+
* @returns
|
|
362
|
+
*/
|
|
363
|
+
export declare const PageWrapper: (props: PageWrapperProps) => JSX.Element;
|
|
298
364
|
export type IframeHandler<T = unknown> = (data: T) => void;
|
|
299
365
|
/**
|
|
300
366
|
* 使用Iframe通讯的API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/pro-layout",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.13",
|
|
4
4
|
"description": "WEB菜单布局",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"react": ">=18.2.0",
|
|
43
43
|
"react-dom": ">=18.2.0",
|
|
44
44
|
"react-router": ">=6.4.5",
|
|
45
|
-
"react-router-dom": ">=6.4.5"
|
|
45
|
+
"react-router-dom": ">=6.4.5",
|
|
46
|
+
"react-is": ">=18.2.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@ant-design/icons": "^4.8.0",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"react": "18.2.0",
|
|
56
57
|
"react-dom": "18.2.0",
|
|
57
58
|
"react-router": "^6.6.1",
|
|
58
|
-
"react-router-dom": "^6.6.1"
|
|
59
|
+
"react-router-dom": "^6.6.1",
|
|
60
|
+
"react-is": "^18.2.0"
|
|
59
61
|
}
|
|
60
62
|
}
|