Cascader: set separator when filtering (#13389)

pull/13398/head
hetech 2018-11-12 19:19:08 +08:00 committed by GitHub
parent bf7bb4b6f5
commit 61f2b8afae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ export default {
const keywordIndex = label.toLowerCase().indexOf(inputValue.toLowerCase()); const keywordIndex = label.toLowerCase().indexOf(inputValue.toLowerCase());
const labelPart = label.slice(keywordIndex, inputValue.length + keywordIndex); const labelPart = label.slice(keywordIndex, inputValue.length + keywordIndex);
const node = keywordIndex > -1 ? this.highlightKeyword(label, labelPart) : label; const node = keywordIndex > -1 ? this.highlightKeyword(label, labelPart) : label;
return index === 0 ? node : [' / ', node]; return index === 0 ? node : [` ${this.separator} `, node];
}); });
}, },
highlightKeyword(label, keyword) { highlightKeyword(label, keyword) {