Browse Source

JSY-38096 fix: TreeValueChooserPane中item支持显示图标

research/test
Renzo 9 months ago
parent
commit
c193dd7f07
  1. 3
      packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js
  2. 2
      packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js
  3. 1
      packages/fineui/src/widget/multiselecttree/multiselecttree.js
  4. 1
      packages/fineui/src/widget/multiselecttree/multiselecttree.popup.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;

1
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()) {

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,
});

Loading…
Cancel
Save