Delete a piece of data
pop up delete prompt box
click Cancel
browser console error
error reason:
This.$confirm method has a built-in promise method.
So you can't remove the .catch() (because when the operation is cancelled, it can't be caught))
Solution:
Add catch after delete method, and add method body () = & gt; {} in catch
/** Delete button operation */
handleDelete(row) {
const eCodes = row.eCode || this.ids;
this.$confirm('Do you want to confirm the deletion of this data?' , "warning", {
confirmButtonText: "OK",
cancelButtonText: "Cancel",
type: "warning"
}).then(function() {
return deleteEquipment(eCodes);
}).then(() => {
this.getList();
this.msgSuccess("Deleted successfully");
}).catch(()=>{}) //---here's the kicker---
},
Read More:
- Vue Uncaught (in promise) Error: Navigation cancelled from “/home“ to “/login“ with a new navigation
- Uncaught (in promise) Error: Delete success at __webpack_exports__.default 405 error
- How to Solve jQuery error: Uncaught ReferenceError: $ is not defined
- How to Solve Uncaught Error: Syntax error, unrecognized expression:#
- vue VM682:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
- How to Solve Vue & Django Cross-domain Issue
- How to Solve Vue Error: EACCES: permission denied
- [Solved] Vue + uniapp Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- Doris BrokerLoad Error: quality not good enough to cancel
- Doris BrokerLoad Error: quality not good enough to cancel
- [Solved] Vue Error: Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- github Error: Logon failed, use ctrl+c to cancel basic credential prompt.
- How to Solve VMware Workstation Error: This virtual machine appears to be in use.
- Refresh 404 after packaging Vue project, uncaught syntax error: unexpected token <
- Vue ElementUI el-dropdown Error: Uncaught TypeError: Cannot read property ‘disabled‘ of null
- How to Solve elasticSearch8.1.2 Install Error in Win10
- How to Solve AOP error in Spring
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode
- How to Solve Tabbarview error in Column 2021