看起来标红的地方应该是赋值成功的,但是是proxy对象,里面那个 [[Target]]
就是真实对象。
// 被勾选的
pitchOn (val) {
console.log(val) // 打印结果是一个Proxy对象
console.log(JSON.parse(JSON.stringify(val))) // 序列化后可以取值
const newVal = JSON.parse(JSON.stringify(val))
this.result = newVal
this.removeID = []
this.result.forEach((v) => {
this.removeID.push(v.id)
})
console.log(JSON.parse(JSON.stringify(this.removeID)))
序列化后即可取值:JSON.parse(JSON.stringify(val))
打印结果: