vue.js - How Vue monitors data changes like Angular.js watch
世界只因有你
世界只因有你 2017-05-15 17:07:33
0
4
846

For example, I monitor the content in an input box,

Execute a function when the data changes, otherwise execute another function.

世界只因有你
世界只因有你

reply all(4)
Ty80
new Vue({
    watch: {
        name: function(newValue, oldValue){
        }
    }
})
巴扎黑

Vue’s responsiveness is the ob.observe() method, and there is no need for dirty monitoring methods like watch.

我想大声告诉你

vue also has watch method, see http://cn.vuejs.org/guide/com...

伊谢尔伦

Vue provides a more general method to reflect data changes through watch settings

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template