From 9575cf4c5d527e1f08cfaa861a7300d04288e00e Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 17 Dec 2020 17:12:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?KERNEL-6431=E8=A1=A5=E5=85=85=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/iframe/iframe.ts | 14 +++++++- typescript/core/wrapper/layout/layout.card.ts | 36 +++++++++++++++++++ typescript/index.ts | 12 ++++++- typescript/widget/time/time.combo.ts | 13 +++++++ .../widget/yearmonth/combo.yearmonth.ts | 14 ++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 typescript/core/wrapper/layout/layout.card.ts create mode 100644 typescript/widget/time/time.combo.ts create mode 100644 typescript/widget/yearmonth/combo.yearmonth.ts diff --git a/typescript/base/single/iframe/iframe.ts b/typescript/base/single/iframe/iframe.ts index 2873ac4af..f98ae6f4b 100644 --- a/typescript/base/single/iframe/iframe.ts +++ b/typescript/base/single/iframe/iframe.ts @@ -1,4 +1,4 @@ -import { _Single } from "../single"; +import { Single, _Single } from "../single"; export interface _Iframe extends _Single { setSrc(v: string): void; @@ -9,3 +9,15 @@ export interface _Iframe extends _Single { getName(): string; } + +export declare class iframe extends Single { + static xtype: string; + + setSrc(v: string): void; + + getSrc(): string; + + setNam(v: string): void; + + getName(): string; +} diff --git a/typescript/core/wrapper/layout/layout.card.ts b/typescript/core/wrapper/layout/layout.card.ts new file mode 100644 index 000000000..35a495143 --- /dev/null +++ b/typescript/core/wrapper/layout/layout.card.ts @@ -0,0 +1,36 @@ +import { Widget } from "../../widget"; +import { Layout } from "../layout"; + +export declare class CardLayout extends Layout { + static xtype: string; + + empty(): void; + + isCardExisted(cardName: string): boolean; + + getCardByName(name: string):T; + + deleteCardByName(cardName: string): void; + + addCardByName(cardName: string, cardItem: any): Widget + + showCardByName(cardName: string, action: any, callback: () => void): void; + + showLastCard(): void; + + setDefaultShowName(name: string): void; + + getDefaultShowName(): string; + + getAllCardNames(): string[]; + + getShowingCard(): T; + + deleteAllCard(): void; + + hideAllCard(): void; + + isAllCardHide(): boolean; + + removeWidget(nameOrWidget: string | Widget): void; +} diff --git a/typescript/index.ts b/typescript/index.ts index a0b97af80..7e2169e6f 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -8,7 +8,7 @@ import { _Button, _ButtonStatic, Button } from "./base/single/button/buttons/but import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text"; import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem"; import { _Editor, _EditorStatic, Editor } from "./base/single/editor/editor"; -import { _Iframe } from "./base/single/iframe/iframe"; +import { iframe, _Iframe } from "./base/single/iframe/iframe"; import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox"; import { _Input, _InputStatic } from "./base/single/input/input"; import { _AbstractLabel, AbstractLabel } from "./base/single/label/abstract.label"; @@ -102,6 +102,9 @@ import { MultiTreePopup } from "./widget/multitree/multi.tree.popup"; import { SingleSelectRadioItem } from "./case/button/item.singleselect.radio"; import { SingleSelectInsertCombo } from "./widget/singleselect/singleselect.insert.combo"; import { SingleSelectCombo } from "./widget/singleselect/singleselect.combo"; +import { CardLayout } from "./core/wrapper/layout/layout.card"; +import { DynamicYearMonthCombo } from "./widget/yearmonth/combo.yearmonth"; +import { TimeCombo } from "./widget/time/time.combo"; type ClassConstructor = T & { @@ -217,6 +220,9 @@ export interface BI extends _func, _i18n, _base, _inject { SingleSelectRadioItem: typeof SingleSelectRadioItem; SingleSelectInsertCombo: typeof SingleSelectInsertCombo; SingleSelectCombo: typeof SingleSelectCombo; + CardLayout: typeof CardLayout; + DynamicYearMonthCombo: typeof DynamicYearMonthCombo; + TimeCombo: typeof TimeCombo; } export default { @@ -309,4 +315,8 @@ export { SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, + CardLayout, + DynamicYearMonthCombo, + TimeCombo, + iframe, }; diff --git a/typescript/widget/time/time.combo.ts b/typescript/widget/time/time.combo.ts new file mode 100644 index 000000000..fa14d017f --- /dev/null +++ b/typescript/widget/time/time.combo.ts @@ -0,0 +1,13 @@ +import { Single } from "../../base/single/single"; + +export declare class TimeCombo extends Single { + static xtype: string; + static EVENT_KEY_DOWN: string; + static EVENT_CONFIRM: string; + static EVENT_CHANGE: string; + static EVENT_VALID: string; + static EVENT_ERROR: string; + static EVENT_BEFORE_POPUPVIEW: string; + + hidePopupView(): void; +} diff --git a/typescript/widget/yearmonth/combo.yearmonth.ts b/typescript/widget/yearmonth/combo.yearmonth.ts new file mode 100644 index 000000000..382729819 --- /dev/null +++ b/typescript/widget/yearmonth/combo.yearmonth.ts @@ -0,0 +1,14 @@ +import { Single } from "../../base/single/single"; + +export declare class DynamicYearMonthCombo extends Single { + static xtype: string; + static EVENT_ERROR: string; + static EVENT_VALID: string; + static EVENT_FOCUS: string; + static EVENT_CONFIRM: string; + static EVENT_BEFORE_POPUPVIEW: string; + + hideView(): void; + + getKey(): string; +} From df4b959530a70fbb12ebe4821e5402e8dcbf5c28 Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 17 Dec 2020 17:16:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=99=E9=94=99?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/iframe/iframe.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/base/single/iframe/iframe.ts b/typescript/base/single/iframe/iframe.ts index f98ae6f4b..a9a2c8bdf 100644 --- a/typescript/base/single/iframe/iframe.ts +++ b/typescript/base/single/iframe/iframe.ts @@ -5,7 +5,7 @@ export interface _Iframe extends _Single { getSrc(): string; - setNam(v: string): void; + setName(v: string): void; getName(): string; } @@ -17,7 +17,7 @@ export declare class iframe extends Single { getSrc(): string; - setNam(v: string): void; + setName(v: string): void; getName(): string; }