【发布时间】:2023-03-21 03:59:02
【问题描述】:
我有一个数据数组(选定项),我需要将此数组的 id 提取到新数组中,这样我就可以只将这些 id 发送到后端。
代码
method
toggleSelection(rows) {
console.log('this.multipleSelection : ',this.multipleSelection); // prints my default array (include all data)
this.multipleSelection.forEach(row => {
console.log('rows: ', row) // get each object of array (extract ids here)
// send axios request to backend (ids only)
});
},
截图
这是上面控制台代码的结果
有什么想法吗?
【问题讨论】:
标签: javascript typescript vue.js vuejs2