Now I use vue to write projects. There are many pages, many of which have a delete confirmation box. Can I write this delete box as a component and call it every time, but the data inside changes?
Communication between sibling components will be used, but how can the delete button on different pages call this component?
Encapsulate the delete confirmation box into a module.
Save necessary attributes for easy display of information.
Set aside click events to confirm deletion and cancellation.
The calling method of this module is different from ordinary components. You can go online to find an example of a Vue modal box.
You can refer to the implementation of the modal component in iview.
https://github.com/iview/ivie...