Vue of listeners

Listener: watch

The main function is to monitor data changes

The basic syntax is:

The method of the same name, and wherein the listener to listen to the data value. newValue is the new value is the old value oldValue

When the monitor complex type: for example, the depth of the object to enable listeners

 

 

Published 52 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/liz9411/article/details/104021989