vue2 configList immediate true handlernewItems consolelognewItems; deep true
This code is defining a configList property in a Vue 2 component.
The configList property is an object that has three keys:
-
immediate: This key is set totrue, which means that the handler function will be called immediately when the component is created. -
handler: This key is a function that will be called whenever theconfigListproperty is updated. ThenewItemsparameter in the function represents the new value of theconfigListproperty. -
deep: This key is set totrue, which means that thehandlerfunction will also be called if any nested properties of theconfigListobject are modified.
In this case, the handler function simply prints the newItems value to the console.
原文地址: https://www.cveoy.top/t/topic/i5Wi 著作权归作者所有。请勿转载和采集!