<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
<script>
/* forEach可以改变数组的结构 */
var obj=[{name:'wang',checked:true},{name:'li',checked:false}];
obj.forEach(item=>item.checked=true)
console.log(obj) // var obj=[{name:'wang',checked:true},{name:'li',checked:true}];
</script>