Cannot read property 'validate' of undefined
在使用element-UI表单验证中一直报错,'Error in event handler for “click”: “TypeError: Cannot read property ‘validate’ of undefined”',
经过反复检查比对,发现是一个低级错误的坑。
<el-button type="primary" class="login-btn" @click="loginSubmit('form')">登录</el-button>
@click="loginSubmit()"参数没有加单引号,
谨记:传参加单引号