前端数组筛选 日结搬砖工 2023-06-15 44 阅读1分钟 const reg = new RegExp(^${value}, 'ig'); const newList = roomList.filter((item) => reg.test(item.value)); setSearchRoomList(newList)