Components applet communication are three ways to pass the value of the child to the parent ==

Three methods of communication component applet

 

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

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

From father to son to value

The first step: the applet from father to son defined component values ​​in the method of the parent

Step Two: sub applet on the label used in the subassembly wxml file transmitted to the parent of the parent to the traditional values ​​of the second portion The method of subassembly

The third step: a small program to call from father to son the value of the third step in the js file subassembly this · triggerEvent trigger method while passing a parameter to the parent component

 

The fourth step: a fourth step by receiving subassembly e · detail pass parameters back within the definition of a good first step of the method

 

Guess you like

Origin www.cnblogs.com/xiaoxiaoxun/p/11415279.html