Browse Source

Merge pull request #264959 in DEC/fineui from master to feature/x

* commit '53e250fb7643de213b50008486fe9fd8c8b3b9e8':
  JSY-38096 fix: TreeValueChooserPane的搜索中item支持显示图标
  JSY-38096 fix: TreeValueChooserPane中item支持显示图标
master
superman 10 months ago
parent
commit
f52925f60d
  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