Correct writing: use async before valid
/**Submit*/
handleSubmit() {
this.$refs["form"].validate(async valid => {
if (valid) {
await this.handleUploadFile();
}
ApiUpdateOrganBrand(this.form).then(res => {
console.log(res);
this.$message.success("Brand configuration success");
this.handleClose();
});
});
},
I started by writing async in front of handle submit, reporting the unexpected reserved word ‘await’
Read More:
- [Solved] Chrome submission error: Form submission canceled because the form is not connected
- The loop of life and death occurs when the El table component of element UI is bidirectional bound
- How to Solve Error: Element ‘dependency’ cannot have character [children], because the type’s content type is element-
- [Solved] Error: Message failed: 554 5.2.0 STOREDRV.Submission.Exception:OutboundSpamException;
- How to Solve Error: “initializer element is not constant”
- How to Fix “initializer element is not constant” error
- How to Solve Element Error: target is not existed: .page-component__scroll .el-scrollbar__wrap
- [Solved] RuntimeError: each element in list of batch should be of equal size
- Angular Error: No value accessor for form control with name ‘xxx’
- maven Error: Element ‘dependency’ cannot have character [children], because the type’s content type is
- [Solved] error“:“element click intercepted“,“message“:“element click intercepted“
- VS Open the UI file of QT Crash and Report Error [How to Solve]
- [Solved] element-plus Error: Failed to resolve component
- NUXT Run generate error: is not in cwd [How to Solve]
- Unknown custom element: [xxx] – did you register the component correctly…
- Uiautomatorviewer Error: Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT…
- [How to Solve Vue warn]: Unknown custom element: did you register the component correctly?
- [Solved] Vue3 Eslint Error: The template root requires exactly one element
- [Solved] SpringMVC Error: element web-app must be declared
- How to Solve Error: Cannot find the declaration of element ‘beans’.