前端数组筛选

44 阅读1分钟

const reg = new RegExp(^${value}, 'ig'); const newList = roomList.filter((item) => reg.test(item.value)); setSearchRoomList(newList)