From ce8c17c1df220208cc4dea8043f2af31258e10cb Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 6 May 2020 17:28:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-30618=20feat:=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../abstract.treevaluechooser.ts | 37 +++++++++++++++++++ typescript/index.ts | 2 + 2 files changed, 39 insertions(+) create mode 100644 typescript/component/treevaluechooser/abstract.treevaluechooser.ts diff --git a/typescript/component/treevaluechooser/abstract.treevaluechooser.ts b/typescript/component/treevaluechooser/abstract.treevaluechooser.ts new file mode 100644 index 000000000..7dae875cd --- /dev/null +++ b/typescript/component/treevaluechooser/abstract.treevaluechooser.ts @@ -0,0 +1,37 @@ +import { _Widget } from "../../core/widget"; + +export interface _AbstractTreeValueChooser extends _Widget { + _valueFormatter: (v: string) => string; + + _initData: (items: any[]) => void; + + _itemsCreator: (options: any, callback: Function) => void; + + _reqDisplayTreeNode: (options: any, callback: Function) => void; + + _reqSelectedTreeNode: (options: any, callback: Function) => void; + + _reqAdjustTreeNode: (options: any, callback: Function) => void; + + _reqInitTreeNode: (options: any, callback: Function) => void; + + _reqTreeNode: (options: any, callback: Function) => void; + + _getAddedValueNode: (parentValues: any[], selectedValues: any) => any[]; + + _getNode: (selectedValues: any, parentValues: any[]) => any; + + _deleteNode: (selectedValues: any, values: any[]) => void; + + _buildTree: (jo: any, values: any) => void; + + _isMatch: (parentValues: any, value: any, keyword: any) => boolean; + + _getTreeNode: (parentValues: any, v: any) => any; + + _getChildren: (parentValues: any) => any; + + _getAllChildren: (parentValues: any) => any; + + _getChildCount: (parentValues: any) => number; +} diff --git a/typescript/index.ts b/typescript/index.ts index 7c04aaf23..e787695c8 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -33,6 +33,7 @@ import { _OB } from "./core/ob"; import { _Widget, _WidgetStatic } from "./core/widget"; import { _Layout } from "./core/wrapper/layout"; import { _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape"; +import { _AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; type ClassConstructor = T & { @@ -76,6 +77,7 @@ export interface BI extends _func, _i18n, _base { Layout: ClassConstructor<_Layout>; HTapeLayout: ClassConstructor<_HTapeLayout>; VTapeLayout: ClassConstructor<_VTapeLayout>; + AbstractTreeValueChooser: ClassConstructor<_AbstractTreeValueChooser>; Decorators: typeof decorator; }