Methodological issues of how to call the Vue parent component sub-assemblies (pop-up) in

If the sub-assembly is a pop-up box, click only when a trigger event pop-up box to appear (that is to say with a v-if using the parent on the child component assembly), that on the parent component if you do not click on the pop-up box You can not get to the $ ref.

The reason: a reference point to an instance of sub-components created, can be understood as tied to the DOM structure
that happens if I want to call is that child (pop-up) of the method, but do not want to display a pop-up, how to do it?
Solution: the v-if replaced with v-show, so DOM element will always be present in the parent assembly, sub-assembly method can also call

Guess you like

Origin www.cnblogs.com/zsg88/p/10990298.html