From 44f68ac91999c958dd2834674f3197bc86a024c5 Mon Sep 17 00:00:00 2001 From: Guyi Date: Wed, 28 Oct 2020 22:17:31 +0800 Subject: [PATCH] =?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 0000000000..98a9a21e6a --- /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 903d9c6e36..022aabee64 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 {