Commit 9acf0ceb authored by ibuler's avatar ibuler

[Update] 为空时关闭展开的tree

parent 7771ff9b
cn.json
\ No newline at end of file
......@@ -184,10 +184,10 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
filter() {
const zTreeObj = $.fn.zTree.getZTreeObj('ztree');
const _keywords = $('#keyword').val();
zTreeObj.showNodes(this.hiddenNodes);
function filterFunc(node) {
const _keywords = $('#keyword').val();
if (node.isParent || node.name.indexOf(_keywords) !== -1) {
return false;
}
......@@ -195,9 +195,12 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
}
this.hiddenNodes = zTreeObj.getNodesByFilter(filterFunc);
zTreeObj.hideNodes(this.hiddenNodes);
zTreeObj.expandAll(true);
if (_keywords) {
zTreeObj.expandAll(true);
} else {
zTreeObj.expandAll(false);
}
}
}
......
export const environment = {
production: true
};
export const version = '1.3.0-{{BUILD_NUMBER}} GPLv2.';
// export const version = '1.3.0-{{BUILD_NUMBER}} GPLv2.';
export const version = '1.3.0-101 GPLv2.';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment