Browse Source

Pull request #1971: 无JIRA任务 树控件增加getSearcher接口

Merge in VISUAL/fineui from ~TELLER/fineui:KERNEL-7640 to master

* commit '8df30babdc9dff482eb0e2b96eccdf249746c29b':
  feat: 增加getTextot
  refactor: 修改类型
  feat: 增加getSearcher接口
  feat: 增加getSearcher接口
  feat: 增加getSearcher接口
  feat: 增加getSearcher接口
es6
Teller 3 years ago
parent
commit
da4ad9788b
  1. 4
      src/case/trigger/trigger.text.js
  2. 4
      src/case/trigger/trigger.text.select.js
  3. 4
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  4. 4
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  5. 4
      src/component/treevaluechooser/combo.treevaluechooser.js
  6. 9
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  7. 9
      src/widget/multilayersingletree/multilayersingletree.combo.js
  8. 4
      src/widget/multitree/multi.tree.combo.js
  9. 4
      src/widget/multitree/multi.tree.insert.combo.js
  10. 4
      src/widget/multitree/multi.tree.list.combo.js
  11. 4
      src/widget/singletree/singletree.trigger.js
  12. 4
      typescript/component/treevaluechooser/combo.listtreevaluechooser.ts
  13. 3
      typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts
  14. 3
      typescript/component/treevaluechooser/combo.treevaluechooser.ts
  15. 2
      typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts
  16. 4
      typescript/widget/multilayersingletree/multilayersingletree.combo.ts
  17. 3
      typescript/widget/multitree/multi.tree.combo.ts
  18. 3
      typescript/widget/multitree/multi.tree.insert.combo.ts
  19. 3
      typescript/widget/multitree/multi.tree.list.combo.ts

4
src/case/trigger/trigger.text.js

@ -55,6 +55,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
}); });
}, },
getTextor: function() {
return this.text;
},
setTextCls: function(cls) { setTextCls: function(cls) {
var o = this.options; var o = this.options;
var oldCls = o.textCls; var oldCls = o.textCls;

4
src/case/trigger/trigger.text.select.js

@ -64,6 +64,10 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setTipType(v); this.trigger.setTipType(v);
}, },
getTextor: function() {
return this.trigger.getTextor();
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }

4
src/component/treevaluechooser/combo.listtreevaluechooser.js

@ -84,6 +84,10 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
this.combo.hideView(); this.combo.hideView();
}, },
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) { setValue: function (v) {
this.combo.setValue(v); this.combo.setValue(v);
}, },

4
src/component/treevaluechooser/combo.treevaluechooser.insert.js

@ -83,6 +83,10 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this.combo.hideView(); this.combo.hideView();
}, },
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) { setValue: function (v) {
this.combo.setValue(v); this.combo.setValue(v);
}, },

4
src/component/treevaluechooser/combo.treevaluechooser.js

@ -83,6 +83,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this.combo.hideView(); this.combo.hideView();
}, },
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) { setValue: function (v) {
this.combo.setValue(v); this.combo.setValue(v);
}, },

9
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -199,11 +199,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}, },
_getSyncConfig: function () { _getSyncConfig: function () {
var o = this.options; var o = this.options, self = this;
var baseConfig = this._getBaseConfig(); var baseConfig = this._getBaseConfig();
return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {
el: { el: {
type: "bi.single_tree_trigger", type: "bi.single_tree_trigger",
ref: function(_ref) {
self.textTrigger = _ref;
},
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
@ -226,6 +229,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
return this.combo.getValue(); return this.combo.getValue();
}, },
getSearcher: function () {
return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor();
},
populate: function (items) { populate: function (items) {
this.combo.populate(items); this.combo.populate(items);
} }

9
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -202,11 +202,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}, },
_getSyncConfig: function () { _getSyncConfig: function () {
var o = this.options; var o = this.options, self = this;
var baseConfig = this._getBaseConfig(); var baseConfig = this._getBaseConfig();
return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {
el: { el: {
type: "bi.single_tree_trigger", type: "bi.single_tree_trigger",
ref: function(_ref) {
self.textTrigger = _ref;
},
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
@ -220,6 +223,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(config, this._getSearchConfig()); return BI.extend(config, this._getSearchConfig());
}, },
getSearcher: function () {
return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor();
},
setValue: function (v) { setValue: function (v) {
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
this.combo.setValue(v); this.combo.setValue(v);

4
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 () { getValue: function () {
return BI.deepClone(this.storeValue.value); return BI.deepClone(this.storeValue.value);
}, },

4
src/widget/multitree/multi.tree.insert.combo.js

@ -331,6 +331,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.combo.hideView(); this.combo.hideView();
}, },
getSearcher: function () {
return this.trigger.getSearcher();
},
showView: function () { showView: function () {
this.combo.showView(); this.combo.showView();
}, },

4
src/widget/multitree/multi.tree.list.combo.js

@ -363,6 +363,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo.hideView(); this.combo.hideView();
}, },
getSearcher: function () {
return this.trigger.getSearcher();
},
setValue: function (v) { setValue: function (v) {
this.storeValue.value = v || []; this.storeValue.value = v || [];
this.combo.setValue({ this.combo.setValue({

4
src/widget/singletree/singletree.trigger.js

@ -51,6 +51,10 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
return this.options.value || []; return this.options.value || [];
}, },
getTextor: function() {
return this.trigger.getTextor();
},
populate: function (items) { populate: function (items) {
this.trigger.populate(items); this.trigger.populate(items);
} }

4
typescript/component/treevaluechooser/combo.listtreevaluechooser.ts

@ -1,3 +1,5 @@
import { Widget } from "../../core/widget";
import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list"; import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list";
export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser { export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser {
@ -19,4 +21,6 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal
getValue<T>(): T; getValue<T>(): T;
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget;
} }

3
typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts

@ -1,3 +1,4 @@
import { Widget } from "../../core/widget";
import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser";
export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser { export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser {
@ -19,4 +20,6 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose
getValue<T>(): T; getValue<T>(): T;
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget;
} }

3
typescript/component/treevaluechooser/combo.treevaluechooser.ts

@ -1,3 +1,4 @@
import { Widget } from "../../core/widget";
import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser";
export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
@ -21,4 +22,6 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
getAllValue<T>(): T; getAllValue<T>(): T;
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget;
} }

2
typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts

@ -13,4 +13,6 @@ export declare class MultiLayerSelectTreeCombo extends Widget {
getValue(): string[]; getValue(): string[];
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget;
} }

4
typescript/widget/multilayersingletree/multilayersingletree.combo.ts

@ -12,5 +12,7 @@ export declare class MultiLayerSingleTreeCombo extends Widget {
getValue(): string[]; getValue(): string[];
populate<T>(items: T[]): void populate<T>(items: T[]): void;
getSearcher(): Widget;
} }

3
typescript/widget/multitree/multi.tree.combo.ts

@ -1,4 +1,5 @@
import { Single } from "../../base/single/single"; import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
export declare class MultiTreeCombo extends Single { export declare class MultiTreeCombo extends Single {
static xtype: string; static xtype: string;
@ -12,4 +13,6 @@ export declare class MultiTreeCombo extends Single {
showView(): void; showView(): void;
hideView(): void; hideView(): void;
getSearcher(): Widget;
} }

3
typescript/widget/multitree/multi.tree.insert.combo.ts

@ -1,5 +1,6 @@
import { Single } from "../../base/single/single"; import { Single } from "../../base/single/single";
import { TreeValue } from "../../base/tree/ztree/treeview"; import { TreeValue } from "../../base/tree/ztree/treeview";
import { Widget } from "../../core/widget";
export declare class MultiTreeInsertCombo extends Single { export declare class MultiTreeInsertCombo extends Single {
static xtype: string; static xtype: string;
@ -20,4 +21,6 @@ export declare class MultiTreeInsertCombo extends Single {
getValue(): TreeValue; getValue(): TreeValue;
populate(): void; populate(): void;
getSearcher(): Widget;
} }

3
typescript/widget/multitree/multi.tree.list.combo.ts

@ -1,4 +1,5 @@
import { Single } from "../../base/single/single"; import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
export declare class MultiTreeListCombo extends Single { export declare class MultiTreeListCombo extends Single {
static xtype: string; static xtype: string;
@ -19,4 +20,6 @@ export declare class MultiTreeListCombo extends Single {
getValue(): string[]; getValue(): string[];
populate(): void; populate(): void;
getSearcher(): Widget;
} }

Loading…
Cancel
Save