Vue knowledge finishing 1: $ watch approach

As shown below: vue can be used $ Watch front of the display method of the current value and the value of the variable, to facilitate determination. Instructions:

vm.$watch('a',function(newval,oldval){

    ......

})

 

 

Guess you like

Origin www.cnblogs.com/KKSoft/p/11618456.html