@flatbiz/pro-layout 4.0.16 → 4.1.1

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/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,32 @@ 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;
286
+ onUpdateIframeTabName: (name: string) => void;
257
287
  } & Omit<BootstrapOptions, "sidebarWidth" | "componentSize" | "locale">;
258
288
  export interface LeaveMenuProps {
259
289
  leaveMenus?: TMenuItem[];
@@ -299,7 +329,7 @@ export type TAny = any;
299
329
  export type TPlainObject<T = TAny> = Record<string, T>;
300
330
  export type PageWrapperServiceConfig = {
301
331
  onRequest: (params?: TAny) => Promise<TPlainObject>;
302
- params?: TPlainObject;
332
+ params?: TPlainObject | (() => TPlainObject);
303
333
  };
304
334
  export interface PageWrapperProps extends Omit<PageProps, "children"> {
305
335
  /** 接口数据配置 */
@@ -317,6 +347,9 @@ export interface PageWrapperProps extends Omit<PageProps, "children"> {
317
347
  /** 自定义异常渲染处理 */
318
348
  errorRender?: (error?: TAny) => ReactElement;
319
349
  }
350
+ export type PageWrapperRefApi = {
351
+ onRefresh: (showLoading?: boolean) => void;
352
+ };
320
353
  /**
321
354
  * 为Page内置接口处理流程组件,如果无全局初始化接口请求场景,请使用Page组件
322
355
  * ```
@@ -328,7 +361,7 @@ export interface PageWrapperProps extends Omit<PageProps, "children"> {
328
361
  * @param props
329
362
  * @returns
330
363
  */
331
- export declare const PageWrapper: (props: PageWrapperProps) => JSX.Element;
364
+ export declare const PageWrapper: import("react").ForwardRefExoticComponent<PageWrapperProps & import("react").RefAttributes<PageWrapperRefApi>>;
332
365
  export type IframeHandler<T = unknown> = (data: T) => void;
333
366
  /**
334
367
  * 使用Iframe通讯的API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/pro-layout",
3
- "version": "4.0.16",
3
+ "version": "4.1.1",
4
4
  "description": "WEB菜单布局",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",