UNPKG

jamis

Version:

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

32 lines (31 loc) 1.21 kB
import React from 'react'; import type { IScopedContext, RendererProps } from 'jamis-core'; import { ScopedContext } from 'jamis-core'; import type { IFrameSchema } from './types'; interface IFrameProps extends RendererProps, Omit<IFrameSchema, 'type' | 'className'> { } export default class IFrame extends React.Component<IFrameProps, object> { IFrameRef: React.RefObject<HTMLIFrameElement>; static propsList: Array<string>; static defaultProps: Partial<IFrameProps>; state: { width: string | number; height: string | number; }; componentDidMount(): void; componentDidUpdate(prevProps: IFrameProps): void; componentWillUnmount(): void; onMessage(e: MessageEvent): void; onLoad(): void; reload(subpath?: any, query?: any): void; receive(values: object): void; postMessage(type: string, data: any): void; render(): JSX.Element; } export declare class IFrameRenderer extends IFrame { static contextType: React.Context<IScopedContext<import("jamis-core").ScopedComponentType>>; context: React.ContextType<typeof ScopedContext>; constructor(props: IFrameProps, context: IScopedContext); componentWillUnmount(): void; } export {};