你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

React开发(270):react控制传参

2021/12/2 4:48:55
     const { birthday, departureTime, entryTime, positionCodeList } = values;
          const { type, employeeEntity, selectedEmployeeRow, partnerCode } = this.props.employee;

          const params = {
            ...values,
            birthdayLong: birthday && birthday.valueOf(),
            departureTimeLong: departureTime && departureTime.valueOf(),
            entryTimeLong: entryTime && entryTime.valueOf(),
            superCode: employeeEntity.superCode,
            salesPartnerCode: partnerCode,
          };

          console.log(params, 'params');
          delete params.positionCodeList;
          delete params.birthday;
          delete params.departureTime;
          delete params.entryTime;
          params.positionCodeList = [positionCodeList];