@flatbiz/pro-layout 4.0.16 → 4.1.0
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 +34 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -71,6 +71,14 @@ export type TAdminUser = null | {
|
|
|
71
71
|
id: string;
|
|
72
72
|
userName: string;
|
|
73
73
|
};
|
|
74
|
+
export type IframeTabItem = {
|
|
75
|
+
id: string | number;
|
|
76
|
+
link: string;
|
|
77
|
+
name: string;
|
|
78
|
+
metaTitle?: string;
|
|
79
|
+
iframeKey: string;
|
|
80
|
+
menuId?: string;
|
|
81
|
+
};
|
|
74
82
|
export interface TRouteItemProps {
|
|
75
83
|
path: string;
|
|
76
84
|
element: ReactElement | ComponentType | null;
|
|
@@ -250,10 +258,31 @@ export type BootstrapOptions = {
|
|
|
250
258
|
topMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
|
|
251
259
|
};
|
|
252
260
|
export type LayoutCtxProps = {
|
|
261
|
+
menus: TMenuItem[];
|
|
262
|
+
siderBarMenus: TMenuItem[];
|
|
263
|
+
/** 平铺数组 */
|
|
264
|
+
siderBarTileMenus: TMenuItem[];
|
|
265
|
+
siderBarMenuActiveItem?: TMenuItem;
|
|
266
|
+
topMenuActiveItem?: TMenuItem;
|
|
267
|
+
iframeTabList: IframeTabItem[];
|
|
268
|
+
iframeTabActiveItem: IframeTabItem;
|
|
253
269
|
sidebarWidth: number;
|
|
254
270
|
componentSize: SizeType;
|
|
255
271
|
routeList: TRouteItemProps[];
|
|
256
272
|
breads: BreadsData;
|
|
273
|
+
collapsed: boolean;
|
|
274
|
+
onChangeCollapsed: (boo: boolean) => void;
|
|
275
|
+
selectedKeys: string[];
|
|
276
|
+
opendKeys: string[];
|
|
277
|
+
onChangeSelectedKeys: (selectedKeys: string[]) => void;
|
|
278
|
+
onChangeOpendKeys: (opendKeys: string[]) => void;
|
|
279
|
+
addOrUpdateIframeTab: (item: TMenuItem) => void;
|
|
280
|
+
onIframChange: (id: string, type: "menuClick" | "iframTabClick") => void;
|
|
281
|
+
onDeleteIframeTabItem: (type: "other" | "all" | "me", id?: string) => void;
|
|
282
|
+
onIframChangeByHttpUrl: (url: string, options?: {
|
|
283
|
+
name?: string;
|
|
284
|
+
metaTitle?: string;
|
|
285
|
+
}) => void;
|
|
257
286
|
} & Omit<BootstrapOptions, "sidebarWidth" | "componentSize" | "locale">;
|
|
258
287
|
export interface LeaveMenuProps {
|
|
259
288
|
leaveMenus?: TMenuItem[];
|
|
@@ -299,7 +328,7 @@ export type TAny = any;
|
|
|
299
328
|
export type TPlainObject<T = TAny> = Record<string, T>;
|
|
300
329
|
export type PageWrapperServiceConfig = {
|
|
301
330
|
onRequest: (params?: TAny) => Promise<TPlainObject>;
|
|
302
|
-
params?: TPlainObject;
|
|
331
|
+
params?: TPlainObject | (() => TPlainObject);
|
|
303
332
|
};
|
|
304
333
|
export interface PageWrapperProps extends Omit<PageProps, "children"> {
|
|
305
334
|
/** 接口数据配置 */
|
|
@@ -317,6 +346,9 @@ export interface PageWrapperProps extends Omit<PageProps, "children"> {
|
|
|
317
346
|
/** 自定义异常渲染处理 */
|
|
318
347
|
errorRender?: (error?: TAny) => ReactElement;
|
|
319
348
|
}
|
|
349
|
+
export type PageWrapperRefApi = {
|
|
350
|
+
onRefresh: (showLoading?: boolean) => void;
|
|
351
|
+
};
|
|
320
352
|
/**
|
|
321
353
|
* 为Page内置接口处理流程组件,如果无全局初始化接口请求场景,请使用Page组件
|
|
322
354
|
* ```
|
|
@@ -328,7 +360,7 @@ export interface PageWrapperProps extends Omit<PageProps, "children"> {
|
|
|
328
360
|
* @param props
|
|
329
361
|
* @returns
|
|
330
362
|
*/
|
|
331
|
-
export declare const PageWrapper: (
|
|
363
|
+
export declare const PageWrapper: import("react").ForwardRefExoticComponent<PageWrapperProps & import("react").RefAttributes<PageWrapperRefApi>>;
|
|
332
364
|
export type IframeHandler<T = unknown> = (data: T) => void;
|
|
333
365
|
/**
|
|
334
366
|
* 使用Iframe通讯的API
|