let arr = [];
if (this.type == 0 || this.type == 1) {
this.tableData &&
this.tableData.map((item, index) => {
if (index == row.$index) {
this.materialNo = item.materialCode;
this.stockNum = item.stockNum;
arr.push({
...item,
...this.form,
});
} else {
arr.push({
...item,
});
}
});
} else {
this.tableData &&
this.tableData.map((item, index) => {
if (index == row.$index) {
arr.push({
...item,
...this.form,
});
} else {
arr.push({
...item,
});
}
});
}
this.tableData = arr;
this.flag1 = null;
前端那些事20240117-前端那些事-判断只有0,1进行赋值操作
最新推荐文章于 2024-10-10 20:22:22 发布