problem causes:
After mouted loads the table data, the hidden pop-up box is not compiled and rendered into the dom. When the click pops up, $refs does not get the dom element, resulting in’resetFields’ of undefined.
solution:
If it is the first time you click to add, there is no need to reset, according to the element undefined judgment
resetForm() { if ( this .$refs.userEditRef !== undefined) { this .$refs.userEditRef.resetFields() } }
Similar Posts:
- [Vue warn]:Error in render: “TypeError: Cannot read property ‘0’ of undefined”
- Four ways to solve selenium’s error “element is not clickable at point…”
- [Solved] Selenium Error: ElementClickInterceptedException
- [Solved] TypeError: Cannot read property ‘getAttribute’ of undefined
- [Solved] View+ts $refs error: Property ‘previewHotel’ does not exist on type ‘Element’.
- [Solved] Vue3 wow.js Error: Cannot set property ‘getPropertyValue’ of undefined
- Selenium: How to Solve Staleelementreferenceexception error (Three Methods)
- Selenium Error: ElementNotInteractableException: Message: element not interactable
- selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
- IOS10 debugging problems – Development cannot be enabled while your device is locked.