尝试使用:
search(event) {
let b;
a.forEach(function(entry) {
b = this.autocompletedata.filter( entry => entry['item']? entry['item'].startsWith(event.query) : false);
});
console.log(b,'result');
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句