首页 > TAG信息列表 > ImmerJS

immerjs与filter踩坑

   const newPatterList = produce(patternList, draft => {       console.log('方案列表与当前方案更新draft1', draft);       let arr = draft.filter((item: any) => item.id === curPattern.id)[0];       console.log('方案列表与当前方案更新arr', arr);