demo is here http://jsfiddle.net/mtcv824d/
<div id="app">
<div @click="change(0)">
{{arr[0]}}
</div>
</div>
new Vue({
el: "-sharpapp",
data: {
arr: [true, false, false]
},
methods: {
change: function(index){
alert(this.arr[index])
this.arr[index] = !this.arr[index]
alert(this.arr[index])
}
}
})
The output in the method finds that the value has changed, but there is no change on the page. what is the reason?