Commit caa8c69b authored by ibuler's avatar ibuler

[Update]搜索不区分大小写

parent e769c99a
......@@ -268,7 +268,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
if (!zTreeObj) {
return null;
}
const _keywords = this.query;
const _keywords = this.query.toLowerCase();
const nodes = zTreeObj.transformToArray(zTreeObj.getNodes());
if (!_keywords) {
if (this.hiddenNodes) {
......@@ -289,9 +289,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
const matchedNodes = zTreeObj.getNodesByFilter(function(node) {
if (node.meta.type === 'asset') {
const host = node.meta.asset;
return host.hostname.indexOf(_keywords) !== -1 || host.ip.indexOf(_keywords) !== -1;
return host.hostname.toLowerCase().indexOf(_keywords) !== -1 || host.ip.indexOf(_keywords) !== -1;
} else {
return node.name.indexOf(_keywords) !== -1;
return node.name.toLowerCase().indexOf(_keywords) !== -1;
}
});
matchedNodes.forEach((node) => {
......
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