The problem is: Use confirm to make conditional judgments. If you click to cancel the deletion and refresh the page, the product type that has just been deleted will be deleted (normally it will not be deleted if you cancel the deletion). What is going on? ?
Post the code and take a look. If you click confirm, it will return a value of true, and if you cancel, it will return false. Is your logic probably as follows?
This question is very simple. You can specify the specified process after "confirm" or "cancel or close" for any confirm or third-party confirm. If there is a problem with the logic you wrote, please post the code
The logic of cancellation and confirmation is reversed, right?