How does vue achieve the effect of layer query box?

< H2 > approximate process < / H2 >

the parent component clicks the button-> pops up the child component"s query box-> the child component clicks to confirm or cancel-> the event triggering the parent component

< H2 > problem description < / H2 >

now you need a component similar to the layer query box. Because I use it more often.

currently we only know that the Dialog of elemen can pop up other components, but I don"t know how calls back events in the child component to the parent component

as shown in figure


the specific requirements are generally understood, but the pop-up boxes are implemented in a variety of ways, and the methods to implement the requirements are also different. But generally speaking, the way of implementation is function transfer. The parent component passes a callback function and the child component triggers

.
Menu