deleteItem(state, { payload }) { return produce(state, (draftState: any) => { const { electronicFenceKey, airportId } = payload; let res = state.detailList.filter((item) => { return !( item.electronicFenceKey == electronicFenceKey && item.airportId == airportId ); }); console.log(state.detailList.length,res.length) state.detailList = [...res]; });
标签:删除,对象,res,electronicFenceKey,airportId,item,state,detailList,redux From: https://www.cnblogs.com/sexintercourse/p/17767501.html