var songs=new Vue({ el:"#song", data:{ songs:[ {name:"A", singer: 'A', id:'a',checked:false}, {name:"B", singer: 'B', id:'b',checked:false}, {name:"C", singer: 'C', id:'c',checked:false}, {name:"D", singer: 'D', id:'d',checked:false}, ] }, methods: { onMouseEnter: function (id) { console.log(id) }, onMouseLeave: function () { } }, computed:{ selectAll:{ get:function(){ return this.$data.songs.every(function(x){ return x.checked==true }) }, set:function(checked){ this.$data.songs.map(function(x){x.checked=checked}) } } } })