From 44f68ac91999c958dd2834674f3197bc86a024c5 Mon Sep 17 00:00:00 2001 From: Guyi Date: Wed, 28 Oct 2020 22:17:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E5=85=85input=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/input/input.ts | 46 +++++++++++++++++++++++++++ typescript/index.ts | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 typescript/base/single/input/input.ts diff --git a/typescript/base/single/input/input.ts b/typescript/base/single/input/input.ts new file mode 100644 index 000000000..98a9a21e6 --- /dev/null +++ b/typescript/base/single/input/input.ts @@ -0,0 +1,46 @@ +import { _Single } from "../single"; + +export interface _Input extends _Single { + onClick(): void; + + onKeyDown(keyCode: number): void; + + focus(): void; + + blur(): void; + + selectAll(): void; + + setValue(v: string): void; + + getValue(): string; + + isEditing(): boolean; + + getLastValidValue(): string; + + getLastChangedValue(): string; + +} + +export interface _InputStatic { + EVENT_CHANGE: string; + EVENT_FOCUS: string; + EVENT_CLICK: string; + EVENT_BLUR: string; + EVENT_KEY_DOWN: string; + EVENT_QUICK_DOWN: string; + EVENT_SPACE: string; + EVENT_BACKSPACE: string; + EVENT_START: string; + EVENT_PAUSE: string; + EVENT_STOP: string; + EVENT_CHANGE_CONFIRM: string; + EVENT_CONFIRM: string; + EVENT_REMOVE: string; + EVENT_EMPTY: string; + EVENT_VALID: string; + EVENT_ERROR: string; + EVENT_ENTER: string; + EVENT_RESTRICT: string; +} diff --git a/typescript/index.ts b/typescript/index.ts index 903d9c6e3..022aabee6 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -10,6 +10,7 @@ import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listite import { _Editor, _EditorStatic } from "./base/single/editor/editor"; import { _Iframe } from "./base/single/iframe/iframe"; import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox"; +import { _Input } from "./base/single/input/input"; import { _AbstractLabel } from "./base/single/label/abstract.label"; import { _Label } from "./base/single/label/label"; import { _Single } from "./base/single/single"; @@ -95,6 +96,7 @@ export interface BI extends _func, _i18n, _base, _inject { Iframe: ClassConstructor<_Iframe>; AbsoluteLayout: ClassConstructor<_AbsoluteLayout>; VerticalLayout: ClassConstructor<_VerticalLayout>; + Input: ClassConstructor<_Input>; } export default { From 39b72aa9915c127892ab18c92ed51a16b3d3a147 Mon Sep 17 00:00:00 2001 From: Guyi Date: Wed, 28 Oct 2020 22:19:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4input=E6=8F=8F=E8=BF=B0=E9=87=8C=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/input/input.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/typescript/base/single/input/input.ts b/typescript/base/single/input/input.ts index 98a9a21e6..006f30064 100644 --- a/typescript/base/single/input/input.ts +++ b/typescript/base/single/input/input.ts @@ -20,7 +20,6 @@ export interface _Input extends _Single { getLastValidValue(): string; getLastChangedValue(): string; - } export interface _InputStatic { From 47f146bcd36a47328f6280f7b6098b720edf9d41 Mon Sep 17 00:00:00 2001 From: Guyi Date: Wed, 28 Oct 2020 22:24:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E5=85=85input=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/index.ts b/typescript/index.ts index 022aabee6..ed0941002 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -10,7 +10,7 @@ import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listite import { _Editor, _EditorStatic } from "./base/single/editor/editor"; import { _Iframe } from "./base/single/iframe/iframe"; import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox"; -import { _Input } from "./base/single/input/input"; +import { _Input, _InputStatic } from "./base/single/input/input"; import { _AbstractLabel } from "./base/single/label/abstract.label"; import { _Label } from "./base/single/label/label"; import { _Single } from "./base/single/single"; @@ -96,7 +96,7 @@ export interface BI extends _func, _i18n, _base, _inject { Iframe: ClassConstructor<_Iframe>; AbsoluteLayout: ClassConstructor<_AbsoluteLayout>; VerticalLayout: ClassConstructor<_VerticalLayout>; - Input: ClassConstructor<_Input>; + Input: ClassConstructor<_Input> & _InputStatic; } export default {