From 46fee5de780489df4ea4fb0558fabd0fb1714e24 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Fri, 23 Jul 2021 14:05:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20refactor:?= =?UTF-8?q?=20=E7=B1=BB=E5=9E=8B=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/combination/combo.ts | 3 ++ typescript/base/combination/expander.ts | 40 +++++++++++++++++++++++++ typescript/index.ts | 3 ++ 3 files changed, 46 insertions(+) create mode 100644 typescript/base/combination/expander.ts diff --git a/typescript/base/combination/combo.ts b/typescript/base/combination/combo.ts index 028414c82..0cae971cd 100644 --- a/typescript/base/combination/combo.ts +++ b/typescript/base/combination/combo.ts @@ -38,6 +38,9 @@ export declare class Combo extends Widget { hoverClass: string; belowMouse: boolean; } + resetListHeight(h: number): void; + + resetListWidth(w: number): void; populate(...args: any[]): void; diff --git a/typescript/base/combination/expander.ts b/typescript/base/combination/expander.ts new file mode 100644 index 000000000..781104f83 --- /dev/null +++ b/typescript/base/combination/expander.ts @@ -0,0 +1,40 @@ +import { Widget } from "../../core/widget"; + +export declare class Expander extends Widget { + static xtype: string; + + static EVENT_EXPAND: number; + static EVENT_COLLAPSE: number; + static EVENT_TRIGGER_CHANGE: number; + static EVENT_CHANGE: number; + static EVENT_AFTER_INIT: number; + static EVENT_BEFORE_POPUPVIEW: string; + static EVENT_AFTER_POPUPVIEW: string; + static EVENT_BEFORE_HIDEVIEW: string; + static EVENT_AFTER_HIDEVIEW: string; + + populate(items?: any, ...args: any[]): void; + + setValue(v: string): void; + + getValue(): string; + + isViewVisible(): boolean; + + isExpanded(): boolean; + + showView(): void; + + hideView(): void; + + getView(): any; + + getAllLeaves(): T[]; + + getNodeById(id: string): T; + + getNodeByValue(v: string): T; + + destroy(): void; + +} diff --git a/typescript/index.ts b/typescript/index.ts index 47816ea45..bc977f9f1 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -82,6 +82,7 @@ import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple"; import { A } from "./base/a/a"; import { Html } from "./base/single/html/html"; import { Switcher } from "./base/combination/switcher"; +import { Expander } from './base/combination/expander'; import { Loader } from "./base/combination/loader"; import { ListPane } from "./case/layer/pane.list"; import { MultiPopupView } from './case/layer/layer.multipopup'; @@ -267,6 +268,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { A: typeof A; Html: typeof Html; Switcher: typeof Switcher; + Expander: typeof Expander; Loader: typeof Loader; ListPane: typeof ListPane; MultiPopupView: typeof MultiPopupView; @@ -415,6 +417,7 @@ export { A, Html, Switcher, + Expander, BubbleCombo, Loader, ListPane, From 2ca2d2a1d4c3e14f7cc42ca17e2ee3f04457083f Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Fri, 23 Jul 2021 14:08:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20refactor:?= =?UTF-8?q?=20=E7=B1=BB=E5=9E=8B=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/combination/expander.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/base/combination/expander.ts b/typescript/base/combination/expander.ts index 781104f83..e874475a2 100644 --- a/typescript/base/combination/expander.ts +++ b/typescript/base/combination/expander.ts @@ -3,11 +3,11 @@ import { Widget } from "../../core/widget"; export declare class Expander extends Widget { static xtype: string; - static EVENT_EXPAND: number; - static EVENT_COLLAPSE: number; - static EVENT_TRIGGER_CHANGE: number; - static EVENT_CHANGE: number; - static EVENT_AFTER_INIT: number; + static EVENT_EXPAND: string; + static EVENT_COLLAPSE: string; + static EVENT_TRIGGER_CHANGE: string; + static EVENT_CHANGE: string; + static EVENT_AFTER_INIT: string; static EVENT_BEFORE_POPUPVIEW: string; static EVENT_AFTER_POPUPVIEW: string; static EVENT_BEFORE_HIDEVIEW: string; From 8544a82ff740b4a73ac3e3a4ecb9e43ee7a55b77 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Fri, 23 Jul 2021 14:10:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20refactor?= =?UTF-8?q?=EF=BC=9A=E7=B1=BB=E5=9E=8B=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/combination/expander.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/base/combination/expander.ts b/typescript/base/combination/expander.ts index e874475a2..ac5c5101e 100644 --- a/typescript/base/combination/expander.ts +++ b/typescript/base/combination/expander.ts @@ -27,7 +27,7 @@ export declare class Expander extends Widget { hideView(): void; - getView(): any; + getView(): T; getAllLeaves(): T[];