1, there is a function in the project to delete, click a pop-up window to display text, delete and cancel buttons, a lot of pages need to be used, so I encapsulated the page into a component, the need to use the page to introduce the component.
2. I use prop to pass the text that needs to be displayed into the component, and call emit in the component to return the clicked result to the parent component, so there will be a problem. When I click on the parent component, the event that triggers the component and the event that returns the result are not together, and sometimes the data is not easy to handle. I want to make the component a combination of element-ui trigger events and return results, so the data will be much easier to handle. I would like to ask you if you have any good ideas to achieve this.
element
this.$confirm(", ?", "", {
confirmButtonText: "",
cancelButtonText: "",
type: "warning"
}).then(() => {
//
}).catch(() => {
//
});