美文网首页
Property 'validate' does not exi

Property 'validate' does not exi

作者: zackxizi | 来源:发表于2018-12-03 00:23 被阅读0次

使用vue-cli 3.0+Element-ui时候,调用form表单校验时候出现的问题是:

Property 'validate' does not exist on type 'Element | Element[] | Vue | Vue[]'.   Property 'validate' does not exist on type 'Element'.

解决方案:

(this.$refs.form as any).validate((valid: boolean) => {
    if (valid) {
    } else {
    }
});

相关文章

网友评论

      本文标题:Property 'validate' does not exi

      本文链接:https://www.haomeiwen.com/subject/zfkecqtx.html