UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

37 lines (36 loc) 1.84 kB
import React from 'react'; import type { ActionObject, IScopedContext, Schema } from 'jamis-core'; import { ScopedContext } from 'jamis-core'; import type { History } from 'history'; import type { IRootStore, RootProps } from './types'; interface RootRendererProps extends RootProps { /** * 当用户自定义路由时使用 */ location?: History['location']; render: (region: string, schema: Schema, props: any) => React.ReactNode; } export declare class RootRenderer extends React.Component<RootRendererProps> { context: React.ContextType<typeof ScopedContext>; store: IRootStore; static contextType: React.Context<IScopedContext<import("jamis-core").ScopedComponentType<import("jamis-core").RendererProps>>>; constructor(props: RootRendererProps); componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: RootRendererProps): void; componentDidCatch(error: any, errorInfo: any): void; handleWinResize: import("lodash").DebouncedFuncLeading<() => void>; handlePageVisibilityChange: () => void; /** * 最上层的handleAction, 所有下级组件的props.onAction最终回溯到这里 */ handleAction(e: React.UIEvent<any> | void, action: ActionObject, ctx: object, throwErrors?: boolean, delegate?: IScopedContext): void; handleDialogConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDialogClose(confirmed?: boolean): void; handleDrawerConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDrawerClose(): void; openFeedback(dialog: any, ctx: any): Promise<unknown>; reloadTarget(scoped: IScopedContext, target: string, data?: any): void; render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined; } export {};