elmer-ui-core
Version:
web app framework
42 lines (41 loc) • 1.7 kB
TypeScript
import { Common } from "elmer-common";
import { IVirtualElement } from "elmer-virtual-dom";
import { IComponent, TypeThemeDefault } from "../interface/IComponent";
export declare abstract class Component<T = Object, S = Object, C = Object> extends Common implements IComponent<T, S, C> {
static propType: any;
static contextType: any;
domList: any;
dom: any;
domData: IVirtualElement;
props: T;
context: C;
state: S;
id: string;
model?: any;
service?: any;
private templateCode;
constructor(props?: T, context?: C);
addEvent(handle: any, dom: HTMLElement | Element | Node, eventName: string, callBack: Function, options?: AddEventListenerOptions): void;
insertAdjacentElement(refElement: HTMLElement | Element | Node, newElement: HTMLElement | Element | Node, InsertMethod: string): void;
setData(data: object, refresh?: boolean): void;
setState(data: object, refresh?: boolean): void;
render(): string;
$afterVirtualRender?(dom?: IVirtualElement): void;
$afterDiff?(dom?: IVirtualElement): void;
$beforeVirtualRender?(dom?: IVirtualElement): void;
$beforeDiff?(dom?: IVirtualElement): void;
$willReceiveProps?(newProps: any, oldProps: any): void;
$init?(): void;
$inject?(): void;
$before?(): void;
$after?(): void;
$resize?(): void;
$dispose?(): void;
redirect?(path: string, params?: any): void;
getChildContext(): any;
$didMount?(): void;
$didUpdate?(): void;
$willMount?(): void;
setTheme<TH>(theme: keyof TH | keyof TypeThemeDefault, themeConfig?: TH): void;
loadTemplate(url: string, isEndPoint?: boolean, ajaxType?: "GET" | "POST"): Promise<any>;
}