From 803c35d564cabf9911cdfaede71e30f26e5c3ed8 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:13:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0getSearcher?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/treevaluechooser/combo.listtreevaluechooser.js | 4 ++++ .../treevaluechooser/combo.treevaluechooser.insert.js | 4 ++++ src/component/treevaluechooser/combo.treevaluechooser.js | 4 ++++ .../component/treevaluechooser/combo.listtreevaluechooser.ts | 3 +++ .../treevaluechooser/combo.treevaluechooser.insert.ts | 3 +++ .../component/treevaluechooser/combo.treevaluechooser.ts | 3 +++ 6 files changed, 21 insertions(+) diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index 51e9cd047..97a682a87 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -84,6 +84,10 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 15ebd6ea0..07c4ad9ec 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -83,6 +83,10 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index 2b567b087..452dce5bb 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -83,6 +83,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts index 9905e830d..7b4b98b08 100644 --- a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts @@ -1,3 +1,4 @@ +import { Trigger } from "typescript/base/single/trigger/trigger"; import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list"; export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser { @@ -19,4 +20,6 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal getValue(): T; populate(items: T[]): void; + + getSearcher(): Trigger; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts index b93afde63..e95e4baeb 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts @@ -1,3 +1,4 @@ +import { Trigger } from "typescript/base/single/trigger/trigger"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser { @@ -19,4 +20,6 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose getValue(): T; populate(items: T[]): void; + + getSearcher(): Trigger; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.ts index a0a87626d..565063b58 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.ts @@ -1,3 +1,4 @@ +import { Trigger } from "typescript/base/single/trigger/trigger"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { @@ -21,4 +22,6 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { getAllValue(): T; populate(items: T[]): void; + + getSearcher(): Trigger; } From 320f74ce969e28da1d510c3f16a85c4c005cf31c Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:17:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0getSearcher?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayerselecttree/multilayerselecttree.combo.js | 9 ++++++++- .../treevaluechooser/combo.listtreevaluechooser.ts | 3 ++- .../treevaluechooser/combo.treevaluechooser.insert.ts | 2 +- .../component/treevaluechooser/combo.treevaluechooser.ts | 2 +- .../multilayerselecttree/multilayerselecttree.combo.ts | 3 +++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index e72d71009..823378647 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -199,11 +199,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, _getSyncConfig: function () { - var o = this.options; + var o = this.options, self = this; var baseConfig = this._getBaseConfig(); return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { el: { type: "bi.single_tree_trigger", + ref: function(_ref) { + self.textTrigger = _ref; + }, text: o.text, height: o.height, items: o.items, @@ -226,6 +229,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { return this.combo.getValue(); }, + getSearcher: function () { + return this.trigger ? this.trigger.getSearcher() : this.textTrigger; + }, + populate: function (items) { this.combo.populate(items); } diff --git a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts index 7b4b98b08..3f6aedcd8 100644 --- a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts @@ -1,4 +1,5 @@ -import { Trigger } from "typescript/base/single/trigger/trigger"; + +import { Trigger } from "../../base/single/trigger/trigger"; import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list"; export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser { diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts index e95e4baeb..d555153ea 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts @@ -1,4 +1,4 @@ -import { Trigger } from "typescript/base/single/trigger/trigger"; +import { Trigger } from "../../base/single/trigger/trigger"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser { diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.ts index 565063b58..b9566ac41 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.ts @@ -1,4 +1,4 @@ -import { Trigger } from "typescript/base/single/trigger/trigger"; +import { Trigger } from "../../base/single/trigger/trigger"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { diff --git a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts index 3dded7a47..e84195729 100644 --- a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts +++ b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts @@ -1,3 +1,4 @@ +import { Trigger } from "../../base/single/trigger/trigger"; import { Widget } from "../../core/widget"; export declare class MultiLayerSelectTreeCombo extends Widget { @@ -13,4 +14,6 @@ export declare class MultiLayerSelectTreeCombo extends Widget { getValue(): string[]; populate(items: T[]): void; + + getSearcher(): Trigger; } From 45de9206ecbc1ef96e1655fd3848705ea91dde26 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:20:31 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0getSearcher?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayersingletree/multilayersingletree.combo.js | 9 ++++++++- .../multilayersingletree/multilayersingletree.combo.ts | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 702ffcccf..11c4fca74 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -202,11 +202,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { }, _getSyncConfig: function () { - var o = this.options; + var o = this.options, self = this; var baseConfig = this._getBaseConfig(); return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { el: { type: "bi.single_tree_trigger", + ref: function(_ref) { + self.textTrigger = _ref; + }, text: o.text, height: o.height, items: o.items, @@ -220,6 +223,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return BI.extend(config, this._getSearchConfig()); }, + getSearcher: function () { + return this.trigger ? this.trigger.getSearcher() : this.textTrigger; + }, + setValue: function (v) { v = BI.isArray(v) ? v : [v]; this.combo.setValue(v); diff --git a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts index 4442fb208..c59716a31 100644 --- a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts +++ b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts @@ -1,3 +1,4 @@ +import { Trigger } from "../../base/single/trigger/trigger"; import { Widget } from "../../core/widget"; export declare class MultiLayerSingleTreeCombo extends Widget { @@ -12,5 +13,7 @@ export declare class MultiLayerSingleTreeCombo extends Widget { getValue(): string[]; - populate(items: T[]): void + populate(items: T[]): void; + + getSearcher(): Trigger; } From 996bbee769a79d38da32082ae328e01200864be0 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:23:05 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0getSearcher?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multitree/multi.tree.combo.js | 4 ++++ src/widget/multitree/multi.tree.insert.combo.js | 4 ++++ src/widget/multitree/multi.tree.list.combo.js | 4 ++++ src/widget/singletree/singletree.trigger.js | 4 ++++ typescript/widget/multitree/multi.tree.combo.ts | 3 +++ typescript/widget/multitree/multi.tree.insert.combo.ts | 3 +++ typescript/widget/multitree/multi.tree.list.combo.ts | 3 +++ 7 files changed, 25 insertions(+) diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index a3e4ef69e..32e26146d 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -334,6 +334,10 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + getValue: function () { return BI.deepClone(this.storeValue.value); }, diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 51456715a..bdaa8a964 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -331,6 +331,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + showView: function () { this.combo.showView(); }, diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 2434c16ad..4deeeba82 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -363,6 +363,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + setValue: function (v) { this.storeValue.value = v || []; this.combo.setValue({ diff --git a/src/widget/singletree/singletree.trigger.js b/src/widget/singletree/singletree.trigger.js index 4168365f5..56f5e2687 100644 --- a/src/widget/singletree/singletree.trigger.js +++ b/src/widget/singletree/singletree.trigger.js @@ -51,6 +51,10 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, { return this.options.value || []; }, + getLabel: function () { + return this.trigger.getLabel(); + }, + populate: function (items) { this.trigger.populate(items); } diff --git a/typescript/widget/multitree/multi.tree.combo.ts b/typescript/widget/multitree/multi.tree.combo.ts index 461d3d822..e69aa4c7a 100644 --- a/typescript/widget/multitree/multi.tree.combo.ts +++ b/typescript/widget/multitree/multi.tree.combo.ts @@ -1,4 +1,5 @@ import { Single } from "../../base/single/single"; +import { Trigger } from "../../base/single/trigger/trigger"; export declare class MultiTreeCombo extends Single { static xtype: string; @@ -12,4 +13,6 @@ export declare class MultiTreeCombo extends Single { showView(): void; hideView(): void; + + getSearcher(): Trigger; } diff --git a/typescript/widget/multitree/multi.tree.insert.combo.ts b/typescript/widget/multitree/multi.tree.insert.combo.ts index 005f05ae0..7baac72f6 100644 --- a/typescript/widget/multitree/multi.tree.insert.combo.ts +++ b/typescript/widget/multitree/multi.tree.insert.combo.ts @@ -1,4 +1,5 @@ import { Single } from "../../base/single/single"; +import { Trigger } from "../../base/single/trigger/trigger"; import { TreeValue } from "../../base/tree/ztree/treeview"; export declare class MultiTreeInsertCombo extends Single { @@ -20,4 +21,6 @@ export declare class MultiTreeInsertCombo extends Single { getValue(): TreeValue; populate(): void; + + getSearcher(): Trigger; } diff --git a/typescript/widget/multitree/multi.tree.list.combo.ts b/typescript/widget/multitree/multi.tree.list.combo.ts index 97d3020ab..67fa3fcb5 100644 --- a/typescript/widget/multitree/multi.tree.list.combo.ts +++ b/typescript/widget/multitree/multi.tree.list.combo.ts @@ -1,4 +1,5 @@ import { Single } from "../../base/single/single"; +import { Trigger } from "../../base/single/trigger/trigger"; export declare class MultiTreeListCombo extends Single { static xtype: string; @@ -19,4 +20,6 @@ export declare class MultiTreeListCombo extends Single { getValue(): string[]; populate(): void; + + getSearcher(): Trigger; } From b56a99c8a8d58ca2b7ecdb7c97c6ec51000e6f59 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:28:32 +0800 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/treevaluechooser/combo.listtreevaluechooser.ts | 4 ++-- .../treevaluechooser/combo.treevaluechooser.insert.ts | 4 ++-- .../component/treevaluechooser/combo.treevaluechooser.ts | 4 ++-- .../widget/multilayerselecttree/multilayerselecttree.combo.ts | 3 +-- .../widget/multilayersingletree/multilayersingletree.combo.ts | 3 +-- typescript/widget/multitree/multi.tree.combo.ts | 4 ++-- typescript/widget/multitree/multi.tree.insert.combo.ts | 4 ++-- typescript/widget/multitree/multi.tree.list.combo.ts | 4 ++-- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts index 3f6aedcd8..bc47f39f3 100644 --- a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts @@ -1,5 +1,5 @@ -import { Trigger } from "../../base/single/trigger/trigger"; +import { Widget } from "../../core/widget"; import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list"; export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser { @@ -22,5 +22,5 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal populate(items: T[]): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts index d555153ea..41b785b18 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts @@ -1,4 +1,4 @@ -import { Trigger } from "../../base/single/trigger/trigger"; +import { Widget } from "../../core/widget"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser { @@ -21,5 +21,5 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose populate(items: T[]): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.ts index b9566ac41..be535af4a 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.ts @@ -1,4 +1,4 @@ -import { Trigger } from "../../base/single/trigger/trigger"; +import { Widget } from "../../core/widget"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { @@ -23,5 +23,5 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { populate(items: T[]): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts index e84195729..489186e72 100644 --- a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts +++ b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts @@ -1,4 +1,3 @@ -import { Trigger } from "../../base/single/trigger/trigger"; import { Widget } from "../../core/widget"; export declare class MultiLayerSelectTreeCombo extends Widget { @@ -15,5 +14,5 @@ export declare class MultiLayerSelectTreeCombo extends Widget { populate(items: T[]): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts index c59716a31..19150a8f6 100644 --- a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts +++ b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts @@ -1,4 +1,3 @@ -import { Trigger } from "../../base/single/trigger/trigger"; import { Widget } from "../../core/widget"; export declare class MultiLayerSingleTreeCombo extends Widget { @@ -15,5 +14,5 @@ export declare class MultiLayerSingleTreeCombo extends Widget { populate(items: T[]): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.combo.ts b/typescript/widget/multitree/multi.tree.combo.ts index e69aa4c7a..d8b546441 100644 --- a/typescript/widget/multitree/multi.tree.combo.ts +++ b/typescript/widget/multitree/multi.tree.combo.ts @@ -1,5 +1,5 @@ import { Single } from "../../base/single/single"; -import { Trigger } from "../../base/single/trigger/trigger"; +import { Widget } from "../../core/widget"; export declare class MultiTreeCombo extends Single { static xtype: string; @@ -14,5 +14,5 @@ export declare class MultiTreeCombo extends Single { showView(): void; hideView(): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.insert.combo.ts b/typescript/widget/multitree/multi.tree.insert.combo.ts index 7baac72f6..b701f580b 100644 --- a/typescript/widget/multitree/multi.tree.insert.combo.ts +++ b/typescript/widget/multitree/multi.tree.insert.combo.ts @@ -1,6 +1,6 @@ import { Single } from "../../base/single/single"; -import { Trigger } from "../../base/single/trigger/trigger"; import { TreeValue } from "../../base/tree/ztree/treeview"; +import { Widget } from "../../core/widget"; export declare class MultiTreeInsertCombo extends Single { static xtype: string; @@ -22,5 +22,5 @@ export declare class MultiTreeInsertCombo extends Single { populate(): void; - getSearcher(): Trigger; + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.list.combo.ts b/typescript/widget/multitree/multi.tree.list.combo.ts index 67fa3fcb5..375d1f5e1 100644 --- a/typescript/widget/multitree/multi.tree.list.combo.ts +++ b/typescript/widget/multitree/multi.tree.list.combo.ts @@ -1,5 +1,5 @@ import { Single } from "../../base/single/single"; -import { Trigger } from "../../base/single/trigger/trigger"; +import { Widget } from "../../core/widget"; export declare class MultiTreeListCombo extends Single { static xtype: string; @@ -21,5 +21,5 @@ export declare class MultiTreeListCombo extends Single { populate(): void; - getSearcher(): Trigger; + getSearcher(): Widget; } From 8df30babdc9dff482eb0e2b96eccdf249746c29b Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Jun 2021 18:43:10 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0getTextot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/trigger/trigger.text.js | 4 ++++ src/case/trigger/trigger.text.select.js | 4 ++++ src/widget/multilayerselecttree/multilayerselecttree.combo.js | 2 +- src/widget/multilayersingletree/multilayersingletree.combo.js | 2 +- src/widget/singletree/singletree.trigger.js | 4 ++-- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/case/trigger/trigger.text.js b/src/case/trigger/trigger.text.js index c1b4bdfeb..8fc69d58c 100644 --- a/src/case/trigger/trigger.text.js +++ b/src/case/trigger/trigger.text.js @@ -55,6 +55,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { }); }, + getTextor: function() { + return this.text; + }, + setTextCls: function(cls) { var o = this.options; var oldCls = o.textCls; diff --git a/src/case/trigger/trigger.text.select.js b/src/case/trigger/trigger.text.select.js index ee7a2c078..03481d1f2 100644 --- a/src/case/trigger/trigger.text.select.js +++ b/src/case/trigger/trigger.text.select.js @@ -64,6 +64,10 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, { this.trigger.setTipType(v); }, + getTextor: function() { + return this.trigger.getTextor(); + }, + populate: function (items) { this.options.items = items; } diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index 823378647..1f7d0e526 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -230,7 +230,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, getSearcher: function () { - return this.trigger ? this.trigger.getSearcher() : this.textTrigger; + return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor(); }, populate: function (items) { diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 11c4fca74..1881af51f 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -224,7 +224,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { }, getSearcher: function () { - return this.trigger ? this.trigger.getSearcher() : this.textTrigger; + return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor(); }, setValue: function (v) { diff --git a/src/widget/singletree/singletree.trigger.js b/src/widget/singletree/singletree.trigger.js index 56f5e2687..91183c033 100644 --- a/src/widget/singletree/singletree.trigger.js +++ b/src/widget/singletree/singletree.trigger.js @@ -51,8 +51,8 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, { return this.options.value || []; }, - getLabel: function () { - return this.trigger.getLabel(); + getTextor: function() { + return this.trigger.getTextor(); }, populate: function (items) {