data() {
return {
specificationList: [ // 规格列表
{
name:'', // 规格项
value: '', // 规格值
}
],
}
},
watch: {
specification: { // 这里监听计算属性里的方法即可
handler(newVal, oldVal) {
},
deep: true
}
},
computed: {
specification () {
// 对 obj 进行深拷贝
return JSON.parse(JSON.stringify(this.specificationList))
}
}
08-11
453
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-25
324
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-25