From 0cdd8a7692a9d3f23bedfa0f5ac91c53d078a1a1 Mon Sep 17 00:00:00 2001 From: iapyang Date: Mon, 23 Sep 2019 10:36:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E7=B1=BB=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/pane.ts | 12 ++++++++++++ typescript/case/loading/loading_pane.ts | 5 +++++ typescript/index.ts | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 typescript/base/pane.ts create mode 100644 typescript/case/loading/loading_pane.ts diff --git a/typescript/base/pane.ts b/typescript/base/pane.ts new file mode 100644 index 000000000..1d8acd8bf --- /dev/null +++ b/typescript/base/pane.ts @@ -0,0 +1,12 @@ +import { _Widget } from "../core/widget"; + +export interface _Pane extends _Widget { + _assertTip: (..._args: any[]) => void; + loading: (..._args: any[]) => void; + loaded: (..._args: any[]) => void; + check: (..._args: any[]) => void; +} + +export interface _PaneStatic { + EVENT_LOADED: "EVENT_LOADED"; +} \ No newline at end of file diff --git a/typescript/case/loading/loading_pane.ts b/typescript/case/loading/loading_pane.ts new file mode 100644 index 000000000..35c0d3aa5 --- /dev/null +++ b/typescript/case/loading/loading_pane.ts @@ -0,0 +1,5 @@ +import { _Pane } from "../../base/pane"; + +export interface _LoadingPane extends _Pane { + __loaded: (...args: any[]) => void; +} diff --git a/typescript/index.ts b/typescript/index.ts index 8cb79dc3b..802a8f651 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -11,6 +11,8 @@ import { _ShowAction } from "./core/action/action.show"; import { _Behavior, _BehaviorFactory } from "./core/behavior/behavior"; import { _HighlightBehavior } from "./core/behavior/behavior.highlight"; import { _RedMarkBehavior } from "./core/behavior/behavior.redmark"; +import { _Pane, _PaneStatic } from "./base/pane"; +import { _LoadingPane } from "./case/loading/loading_pane"; type ClassConstructor = T & { @@ -32,4 +34,6 @@ export interface _BI extends _func, _i18n, _base { BehaviorFactory: ClassConstructor<_BehaviorFactory>; HighlightBehavior: ClassConstructor<_HighlightBehavior>; RedMarkBehavior: ClassConstructor<_RedMarkBehavior>; + Pane: ClassConstructor<_Pane> & _PaneStatic; + LoadingPane: ClassConstructor<_LoadingPane>; }