fix: 修复#6349

This commit is contained in:
msidolphin 2019-11-07 12:19:23 +08:00
parent e2ef9d91ea
commit 63957c72e6
2 changed files with 20 additions and 3 deletions

View file

@ -495,9 +495,14 @@
const nodeText = node.elm ? node.elm.textContent : node.text;
return `${str} ${nodeText}`;
}, '') || '';
const stringValues = JSON.stringify([label, textContent]);
const stringValues = [label, textContent];
const query = this.query.toLowerCase().trim();
return stringValues.toLowerCase().includes(query);
for (let i = 0; i < stringValues.length; ++i) {
if (stringValues[i].toLowerCase().includes(query)) {
return true;
}
}
return false;
},
toggleMenu (e, force) {