The reason is that the form item uses v-if control and appears to be between two normal el-form-items. As follows.
Then when you use this.$refs[“specialForm”].resetFields(); to reset the form, it reports an error:
Solution:
Wrap a div outside el-form-item and use it as an if judgment to avoid it.
Read More:
- [Solved] Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘resetFields‘)“
- [Solved] Error in mounted hook: “Error: please transfer a valid prop
- Please transfer a valid prop path to form item
- [Solved] TYPEERROR: CANNOT READ PROPERTY ‘REDUCE‘ OF UNDEFINED
- Use of error attribute in element UI (solution of triggering only once)
- [Solved] Error in v-on handler: “Error: please transfer a valid prop path to form item
- Parsing error: await is a reserved word [How to Solve]
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- [Vue warn]: Error in mounted hook: “Error: please transfer a valid prop path to form item“
- [Solved] Element form method Error: TypeError: Cannot read properties of undefined (reading ‘resetFields’)
- Node Error: Error: Multipart: Boundary not found [How to Solve]
- Element-plus Warning: ElementPlusError: [Util] binding value must be a string or number.
- [Vue warn]Error in mounted hook: “Error: please transfer a valid prop path to form item“
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- How to download files by post submission under Ajax
- Vue Error: [Vue warn]: Duplicate keys detected
- How to Test whether the property value of each property in the object is not empty
- How to Fix “HTTP 405 method not allowed” Error
- If the request parameter is formdata, use the Ajax operation
- [Solved] Vue binding dynamic inline style Error: transform:rotate()