2020-12-31如何快捷给数组对象添加新属性

        let stockConfirmationResultDtos = [];
        this.confirmations.forEach((item, index) => {
          stockConfirmationResultDtos.push(Object.assign({}, item,
            {'planId': this.planId}))
        });

你可能感兴趣的:(2020-12-31如何快捷给数组对象添加新属性)