From 97a3f25c38f02d71470473ffaa086335c095e329 Mon Sep 17 00:00:00 2001 From: iapyang Date: Thu, 17 Dec 2020 13:52:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A1=A5=E5=85=85=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/tree/ztree/asynctree.ts | 11 +++++++++++ typescript/base/tree/ztree/list/listasynctree.ts | 5 +++++ typescript/base/tree/ztree/list/listtreeview.ts | 5 +++++ typescript/base/tree/ztree/treeview.ts | 2 +- typescript/index.ts | 9 +++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 typescript/base/tree/ztree/asynctree.ts create mode 100644 typescript/base/tree/ztree/list/listasynctree.ts create mode 100644 typescript/base/tree/ztree/list/listtreeview.ts diff --git a/typescript/base/tree/ztree/asynctree.ts b/typescript/base/tree/ztree/asynctree.ts new file mode 100644 index 000000000..b0671368e --- /dev/null +++ b/typescript/base/tree/ztree/asynctree.ts @@ -0,0 +1,11 @@ +import { TreeView, TreeValue } from "./treeview"; + +export declare class AsyncTree extends TreeView { + static xtype: string; + + _beforeExpandNode(treeId: string, treeNode: T): void; + + _join(valueA: TreeValue, valueB: TreeValue): TreeValue; + + _getJoinValue(): TreeValue; +} diff --git a/typescript/base/tree/ztree/list/listasynctree.ts b/typescript/base/tree/ztree/list/listasynctree.ts new file mode 100644 index 000000000..047764c05 --- /dev/null +++ b/typescript/base/tree/ztree/list/listasynctree.ts @@ -0,0 +1,5 @@ +import { ListTreeView } from "./listtreeview"; + +export declare class ListAsyncTree extends ListTreeView { + static xtype: string; +} diff --git a/typescript/base/tree/ztree/list/listtreeview.ts b/typescript/base/tree/ztree/list/listtreeview.ts new file mode 100644 index 000000000..3f1668592 --- /dev/null +++ b/typescript/base/tree/ztree/list/listtreeview.ts @@ -0,0 +1,5 @@ +import { TreeView } from "../treeview"; + +export declare class ListTreeView extends TreeView { + static xtype: string; +} diff --git a/typescript/base/tree/ztree/treeview.ts b/typescript/base/tree/ztree/treeview.ts index aa042e7b8..0bdf2ac30 100644 --- a/typescript/base/tree/ztree/treeview.ts +++ b/typescript/base/tree/ztree/treeview.ts @@ -65,6 +65,6 @@ export declare class TreeView extends Pane { populate(config: {[key: string]: any}): void; } -interface TreeValue { +export interface TreeValue { [key: string]: TreeValue; } diff --git a/typescript/index.ts b/typescript/index.ts index f44447268..b768d88e1 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -105,6 +105,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 { ListTreeView } from "./base/tree/ztree/list/listtreeview"; +import { ListAsyncTree } from "./base/tree/ztree/list/listasynctree"; +import { AsyncTree } from "./base/tree/ztree/asynctree"; type ClassConstructor = T & { @@ -159,6 +162,9 @@ export interface BI extends _func, _i18n, _base, _inject { MultiLayerSelectTreePopup: typeof MultiLayerSelectTreePopup; MultiLayerSingleTreePopup: typeof MultiLayerSingleTreePopup; TreeView: typeof TreeView; + ListTreeView: typeof ListTreeView; + ListAsyncTree: typeof ListAsyncTree; + AsyncTree: typeof AsyncTree; Decorators: typeof decorator; DownListCombo: ClassConstructor<_DownListCombo> & _DownListComboStatic; Iframe: ClassConstructor<_Iframe>; @@ -282,6 +288,9 @@ export { MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, + ListTreeView, + ListAsyncTree, + AsyncTree, Combo, IconCombo, DynamicDateCombo,