if (res.value) {
this.myWorkers = this.myWorkersBack.filter(function(item) {
if (item.name.indexOf(res.value) > -1) {
return true;
}
return false;
});
if (this.myWorkers.length <= 0) {
this.myWorkers = null
}
} else {
this.myWorkers = this.myWorkersBack
}
uniapp-filter和indexOf
最新推荐文章于 2024-05-06 17:09:19 发布