Browse Source

Merge pull request #210222 in DEC/fineui from master to feature/x

* commit '0e1a78d2274387b050578f6c4a3412b403d7dc29':
  无JIRA refactor(widget): 删掉_Widget等,都换成Widget
master
superman 2 years ago
parent
commit
334b24529d
  1. 12
      typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts
  2. 4
      typescript/core/base.ts
  3. 4
      typescript/core/plugin.ts
  4. 404
      typescript/core/widget.ts

12
typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts

@ -1,14 +1,4 @@
import { Widget, _Widget } from "../../core/widget";
export interface _AllValueMultiTextValueCombo extends _Widget {
getValue<T>(): T[];
populate(items: any): void;
}
export interface _AllValueMultiTextValueComboStatic {
EVENT_CONFIRM: string;
}
import { Widget } from "../../core/widget";
export declare class AllValueMultiTextValueCombo extends Widget {
static xtype: string;

4
typescript/core/base.ts

@ -1,4 +1,4 @@
import { _Widget } from "./widget";
import { Widget } from "./widget";
export interface _base {
assert: (v: any, is: Function) => Boolean;
@ -7,7 +7,7 @@ export interface _base {
UUID: () => string;
isWidget: (widget: any) => widget is _Widget;
isWidget: (widget: any) => widget is Widget;
createWidgets: (items: any, options: any, context: any) => any;

4
typescript/core/plugin.ts

@ -1,7 +1,7 @@
import { _Widget } from "./widget";
import { Widget } from "./widget";
type configWidgetFn = (type: string, options: Obj) => void
type configObjectFn = (type: string, widget: _Widget) => void
type configObjectFn = (type: string, widget: Widget) => void
export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void

404
typescript/core/widget.ts

@ -1,396 +1,5 @@
import { OB, _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;
// TODO: 完成jquery文件夹后把这块改了
/**
* dom的类jQuery对象
*/
element: {
width(): number;
height(): number;
width(width: number | string): _Widget["element"];
height(height: number | string): _Widget["element"];
[key: string]: any;
};
/**
*
*/
_children: {
[key: string]: _Widget;
};
/**
*
*/
_isMounted: boolean;
/**
* enable
*/
_manualSetEnable: boolean;
/**
* valid
*/
_manualSetValid: boolean;
_store(): void;
// 生命周期函数
/**
*
*/
beforeInit?(cb: Function): void;
/**
*
*/
beforeCreate?(): void;
/**
*
*/
created?(): void;
/**
*
*/
render?(): any;
/**
*
*/
beforeMount?(): void;
/**
*
*/
mounted?(): void;
/**
*
*/
shouldUpdate?(...args: any[]): 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;
/**
*
*/
reset(): void;
/**
* destory方法
*/
_destroy(): void;
/**
* destory元素
*/
destroy(): void;
}
interface RenderEngine {
// TODO: 完成jquery文件夹后把这块改了
/**
@ -406,7 +15,6 @@ interface RenderEngine {
}
export declare class Widget extends OB {
//
/**
*
* @param engine
@ -441,7 +49,7 @@ export declare class Widget extends OB {
/**
*
*/
_parent: _Widget | null;
_parent: Widget | null;
// TODO: 完成jquery文件夹后把这块改了
/**
* dom的类jQuery对象
@ -458,7 +66,7 @@ export declare class Widget extends OB {
*
*/
_children: {
[key: string]: _Widget;
[key: string]: Widget;
};
/**
@ -666,19 +274,19 @@ export declare class Widget extends OB {
/**
*
*/
addWidget(widget: _Widget): _Widget;
addWidget(_name: any, _widget: _Widget): _Widget;
addWidget(widget: Widget): Widget;
addWidget(_name: any, _widget: Widget): Widget;
/**
* wigetname获取子元素实例
*/
getWidgetByName(_name: string): _Widget | undefined;
getWidgetByName(_name: string): Widget | undefined;
/**
*
* @param nameOrWidget widgetName或widget实例
*/
removeWidget(nameOrWidget: string | _Widget): void;
removeWidget(nameOrWidget: string | Widget): void;
/**
*

Loading…
Cancel
Save