let arr: ListItemType[] = [] const list: any = [...response.data.typeList] list && list.map((item: any) => { arr.push({ code: item.code, id: item.styleId, name: item.styleName }) }) setStyleList2(arr) setStyleList3(arr) const newDate = [...response.data.itemList] setData( newDate.map((item: any) => { return { ...item, editable: false, ordCount: item.count } }) ) setActiveKey(arr[0].id)