This commit is contained in:
梁灏 2018-01-15 18:11:41 +08:00
parent 2a3262456d
commit 3288b53099
3 changed files with 22 additions and 31 deletions

View file

@ -220,7 +220,7 @@
}
getSelections(this.data);
selections = selections.filter(item => {
return item.label ? item.label.indexOf(this.query) > -1 : false
return item.label ? item.label.indexOf(this.query) > -1 : false;
}).map(item => {
item.display = item.display.replace(new RegExp(this.query, 'g'), `<span>${this.query}</span>`);
return item;