From 11e43467a2719860f2ddb1bd417d0b21c0abefeb Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 11 Dec 2020 15:23:44 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6464=20=E8=A1=A5=E5=85=85=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/wrapper/layout.ts | 34 ++++++++++++++++++- .../layout/adapt/adapt.leftrightvertical.ts | 5 +++ typescript/index.ts | 3 ++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts diff --git a/typescript/core/wrapper/layout.ts b/typescript/core/wrapper/layout.ts index c145446bd..672f444d3 100644 --- a/typescript/core/wrapper/layout.ts +++ b/typescript/core/wrapper/layout.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../widget"; +import { _Widget, Widget } from "../widget"; export interface _Layout extends _Widget { addItem(item: any): any; @@ -31,3 +31,35 @@ export interface _Layout extends _Widget { resize(): void; } + +export declare class Layout extends Widget { + addItem(item: any): any; + + prependItem(item: any): any; + + addItemAt(index: string, item: any): any; + + removeItemAt(indexes: any): void; + + shouldUpdateItem(index: number, item: any): boolean; + + updateItemAt(index: number, item: any): any; + + addItems(items: T[], context?: any): void; + + prependItems(items: T[], context?: any): void; + + getValue(): T[]; + + setText(v: string): void; + + update(opt: any): any; + + stroke(items: T[]): void; + + removeWidget(nameOrWidget: any): void; + + populate(items?: T[]): void; + + resize(): void; +} diff --git a/typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts b/typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts new file mode 100644 index 000000000..2f209ca9a --- /dev/null +++ b/typescript/core/wrapper/layout/adapt/adapt.leftrightvertical.ts @@ -0,0 +1,5 @@ +import { Layout } from "../../layout"; + +export declare class LeftRightVerticalAdapt extends Layout { + static xtype: string; +} diff --git a/typescript/index.ts b/typescript/index.ts index 656e55aeb..58fdc2393 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -47,6 +47,7 @@ import { _DefaultLayout } from "./core/wrapper/layout/layout.default"; import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist"; import { Icon } from "./base/single/icon/icon"; import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; +import { LeftRightVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; type ClassConstructor = T & { @@ -105,6 +106,7 @@ export interface BI extends _func, _i18n, _base, _inject { SearchTextValueCombo: ClassConstructor<_SearchTextValueCombo> & _SearchTextValueComboStatic; Icon: typeof Icon; LeftVerticalAdaptLayout: ClassConstructor<_LeftVerticalAdapt>; + LeftRightVerticalAdapt: typeof LeftRightVerticalAdapt; } export default { @@ -114,4 +116,5 @@ export { Widget, Single, Icon, + LeftRightVerticalAdapt, };