Vue.js error: Cannot read property 'validate' of undefined"

error resolution

The reason is that I log in elemnt-ui and place it in the mounted() function by default, which causes Vue to call this function when it is initialized.

I found the following error reasons on the Internet:

1. One is that your ref is wrongly written , which makes it impossible to get the dom of this form. I am obviously not.

2. When we initialized Vue, the validate() function in element-ui was not bound to this.$refs.employee, which caused us to report an error as soon as we got the information.

TypeError: Cannot read properties of undefined (reading ‘xxx‘)

The front end solves many situations of "TypeError: Cannot read properties of undefined (reading 'xxx')_sunwenpinglike's blog-CSDN blog

related error

TypeError: (0 , _api.default) is not a function, the method of import cannot be read and an error is reported

The method name was written wrong when importing,....? But he didn't report an error when he reported an error at the beginning, and he clicked to jump to jump normally. The function is being found???

Guess you like

Origin blog.csdn.net/Qhx20040819/article/details/132661342