Commit 77400245 authored by XieZhiXiong's avatar XieZhiXiong

fix: 兼容订单没有商品的数据

parent e47aa1b2
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-19 15:03:36
* @LastEditTime: 2021-02-20 17:54:10
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -453,7 +453,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
let setChildArr: any = [];
  // 将改变的父Table下的子Table下的 id 都添加到setChildArr中
data.forEach((item: any) => {
setChildArr = [...setChildArr, ...item.productDateilss.map((item: any) => item.id)];
setChildArr = [...setChildArr, ...(item.productDateilss || []).map((item: any) => item.id)];
});
// 第一步判断 selected true:全选,false:取消全选
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment