fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

324 lines
5.8 KiB

5 years ago
import { _OB } from "./ob";
export interface _WidgetStatic {
/**
*
* @param engine
*/
registerRenderEngine(engine: RenderEngine): void;
}
export interface _Widget extends _OB {
/**
* loading的锁
*/
__asking: boolean;
/**
*
*/
__async: boolean;
/**
* widget类标识符
*/
widgetName: string | null;
/**
*
*/
_isRoot: boolean;
/**
*
*/
_parent: _Widget | null;
/**
* dom的类jQuery对象
*/
element: any;
/**
*
*/
_children: {
[key: string]: _Widget;
};
/**
*
*/
_isMounted: boolean;
/**
* enable
*/
_manualSetEnable: boolean;
/**
* valid
*/
_manualSetValid: boolean;
/**
*
*/
_renderEngine: RenderEngine;
_store(): void;
/**
*
*/
beforeInit?(cb: Function): void;
/**
*
*/
beforeCreate?(): void;
/**
*
*/
created?(): void;
/**
*
*/
render?(): any;
/**
*
*/
beforeMount?(): void;
/**
*
*/
mounted?(): void;
/**
*
*/
shouldUpdate?(): void;
/**
*
*/
update?(...args: any[]): void;
/**
*
*/
beforeDestroy?(): void;
/**
*
*/
destroyed?(): void;
/**
* render函数
*/
_initRender: () => void;
/**
* render函数
*/
_render: () => void;
/**
*
*/
_initRoot: () => void;
/**
*
*/
_initElementWidth: () => void;
/**
*
*/
_initElementHeight: () => void;
/**
*
*/
_initVisual: () => void;
/**
*
*/
_initEffects: () => void;
/**
* mounted锁
*/
_initState: () => void;
/**
* dom
*/
_initElement: () => void;
/**
*
*/
_setParent: () => void;
/**
* @param force
* @param deep force处理
* @param lifeHook
* @param predicate widget的回调
*/
_mount(force?: boolean, deep?: boolean, lifeHook?: boolean, predicate?: Function): boolean;
/**
*
*/
_mountChildren?(): void;
/**
*
*/
isMounted(): boolean;
/**
*
*/
setWidth(w: number): void;
/**
*
*/
setHeight(h: number): void;
/**
*
*/
_setEnable(enable: boolean): void;
/**
*
*/
_setValid(valid: boolean): void;
/**
*
*/
_setVisible(visible: boolean): void;
/**
*
*/
setEnable(enable: boolean): void;
/**
*
*/
setVisible(visible: boolean): void;
/**
*
*/
setValid(valid: boolean): void;
/**
*
* @param args arguments参数
*/
doBehavior(...args: any[]): void;
/**
*
*/
getWidth(): number;
/**
*
*/
getHeight(): number;
/**
*
*/
isValid(): boolean;
/**
*
*/
addWidget(_name: any, _widget: _Widget): _Widget;
/**
* wigetname获取子元素实例
*/
getWidgetByName(_name: string): _Widget | undefined;
/**
*
* @param nameOrWidget widgetName或widget实例
*/
removeWidget(nameOrWidget: string | _Widget): void;
/**
*
*/
hasWidget(name: string): boolean;
/**
* widgetName
*/
getName(): string;
/**
* tag
* @param tag html tag
*/
setTag(tag: string): void;
/**
* tag
*/
getTag(): string;
/**
*
* @param key
* @param value
*/
attr(key: string | {
[key: string]: any;
}, value?: any): any;
/**
* text
*/
getText(): string;
/**
* text
*/
setText(text: string): void;
/**
*
*/
getValue(): any;
/**
*
*/
setValue(...args: any[]): void;
/**
* enable
*/
isEnabled(): boolean;
/**
*
*/
isVisible(): boolean;
/**
* disable元素
*/
disable(): void;
/**
* enable元素
*/
enable(): void;
/**
* widget合法
*/
valid(): void;
/**
* 使
*/
invalid(): void;
/**
* 使
*/
invisible(..._args: any[]): void;
/**
*
*/
visible(..._args: any[]): void;
/**
*
*/
__d(): void;
/**
*
*/
_unMount(): void;
/**
* hang元素
*/
isolate(): void;
/**
*
*/
empty(): void;
/**
* destory方法
*/
_destroy(): void;
/**
* destory元素
*/
destroy(): void;
}
interface RenderEngine {
/**
* jQuery对象
* @param widget widget对象
*/
createElement: (widget: any) => any;
/**
* DocumentFragment对象
*/
createFragment: () => DocumentFragment;
}
export {};