Browse Source

Pull request #3732: JSY-38096 fix: TreeValueChooserPane中item支持显示图标

Merge in VISUAL/fineui from ~RENZO.RUAN/a-fineui-r:master to master

* commit '4af5234695fd1df91a72236d851e2164d1b96c61':
  JSY-38096 fix: TreeValueChooserPane的搜索中item支持显示图标
  JSY-38096 fix: TreeValueChooserPane中item支持显示图标
research/test
Renzo.Ruan-阮宗伟 10 months ago
parent
commit
53e250fb76
  1. 3
      packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js
  2. 2
      packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js
  3. 2
      packages/fineui/src/widget/multiselecttree/multiselecttree.js
  4. 1
      packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js
  5. 1
      packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js

3
packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js

@ -169,6 +169,7 @@ export class AbstractTreeValueChooser extends Widget {
value: node.value,
open: true,
disabled: node.disabled,
iconCls: node.iconCls,
});
}
}
@ -531,6 +532,7 @@ export class AbstractTreeValueChooser extends Widget {
halfCheck: half,
flag,
disabled: node.disabled,
iconCls: node.iconCls,
});
}
@ -702,6 +704,7 @@ export class AbstractTreeValueChooser extends Widget {
disabled: nodes[i].disabled,
title: nodes[i].title || nodes[i].text,
warningTitle: nodes[i].warningTitle,
iconCls: nodes[i].iconCls,
});
if (openState) {
getResult(parentValues.concat([nodes[i].value]), { checked: state[0], half: state[1] });

2
packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js

@ -15,6 +15,7 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser {
items: null,
itemsCreator: emptyFn,
showLine: true,
showIcon: false,
//searcherPaneAutoShrink和searcherPaneIsSelectedAny同时为false时,返回值和非搜索状态下的树逻辑一致
searcherPaneAutoShrink: true,//其搜索树是否会判别子结点全选则取父结点的值
searcherPaneIsSelectedAny: true, //其搜索树是否返回所有被checked的结点(包括被checked的结点的子结点)
@ -28,6 +29,7 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser {
type: o.hideSearch ? MultiSelectTreePopup.xtype : MultiSelectTree.xtype,
element: this,
showLine: o.showLine,
showIcon: o.showIcon,
searcherPaneIsSelectedAny: o.hideSearch || o.searcherPaneIsSelectedAny,
itemsCreator: (options, callback) => {
options.searcherPaneAutoShrink = o.hideSearch || o.searcherPaneAutoShrink;

2
packages/fineui/src/widget/multiselecttree/multiselecttree.js

@ -30,6 +30,7 @@ export class MultiSelectTree extends Single {
type: MultiSelectTreePopup.xtype,
itemsCreator: o.itemsCreator,
showLine: o.showLine,
showIcon: o.showIcon,
});
this.adapter.on(MultiSelectTreePopup.EVENT_CHANGE, () => {
if (self.searcher.isSearching()) {
@ -45,6 +46,7 @@ export class MultiSelectTree extends Single {
this.searcherPane = createWidget({
type: MultiTreeSearchPane.xtype,
cls: "bi-border-left bi-border-right bi-border-bottom",
showIcon: o.showIcon,
isSelectedAny: o.searcherPaneIsSelectedAny,
keywordGetter() {
return self.searcher.getKeyword();

1
packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js

@ -22,6 +22,7 @@ export class MultiSelectTreePopup extends Widget {
this.popup = createWidget({
type: AsyncTree.xtype,
showLine: o.showLine,
showIcon: o.showIcon,
element: this,
itemsCreator: o.itemsCreator,
});

1
packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js

@ -31,6 +31,7 @@ export class MultiTreeSearchPane extends Pane {
opts.itemsCreator(op, callback);
},
value: opts.value,
showIcon: opts.showIcon,
listeners: [
{
eventName: Controller.EVENT_CHANGE,

Loading…
Cancel
Save