【发布时间】:2021-12-22 07:50:26
【问题描述】:
有一个时间列表,大写。如果输入文本是小写的,我该如何找到它们?
例如:巴塞罗那,当输入“bar”时,找到它。尝试使用 .lowercase() 但不起作用
onSearch(text){
if(text){
const filter_data=this.old_locations.filter((element) => element.title.includes(text));
this.locations=filter_data;
}else{
this.locations=this.old_locations;
}
}
【问题讨论】:
标签: javascript ionic-framework ionic4