(Still 031) Vue_ case _ custom events (inter-component communication 2 ways: vue custom events)

Custom event:

We know that the use of the parent component sub-assemblies prop transfer data, but how subassembly components that communicate with a parent do?

This time Vue custom event system will come in handy.

Custom event to know two things:

(1) Binding

(2) Trigger

 

 Note: $ on (eventName, callback)

===================================================================

Guess you like

Origin www.cnblogs.com/curedfisher/p/12055902.html