import React from 'react'; /** * 单应用首页设置 */ export interface AppHomePageSettings { /** * 主标题 */ title?: string; /** * 副标题 */ subtitle?: string; /** * 徽标url */ logo?: string; /** * 标题图片 */ titleImg?: string; /** * 头部背景url */ appBarBgUrl?: string; /** * 头部背景颜色,可以是渐变色 */ appBarBgColor?: string; /** * 是否显示导航回退按钮 */ showBackButton?: boolean; /** * 指定回退的链接。在指定了`showBackButton`为`true`时起作用。不指定,则调用`history.goBack()`。 */ backUrl?: string; /** * 标题垂直位置,在titleImg存在时起作用 */ titleYPos?: number; /** * 标题水平位置,在titleImg存在时起作用 */ titleXPos?: number; } export interface GroupFormResourceType { id: string; resourceId: string; name: string; resourcePid: string; ext: string; children: GroupFormResourceType[]; url?: string; } export interface AppHomePageContextInterface { settings: AppHomePageSettings; /** * 应用下资源 */ appResources: GroupFormResourceType[]; /** * 加载导航数据 */ fetch(): Promise; /** * 应用标题 */ title: string; /** * 点击应用下资源触发事件 */ onClickResource: (item: GroupFormResourceType, parentItem?: GroupFormResourceType) => void; /** * 应用菜单处于展开状态的分组资源 和流程表单资源id */ expandGroupForms: string[]; /** * 选中资源id */ selectedResourceId: string | undefined; } /** * 单应用首页上下文 */ declare const AppHomePageContext: React.Context; export default AppHomePageContext;