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

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

解决方案


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

博客看自:https://blog.csdn.net/weixin_34117522/article/details/86810945

Property 'validate' does not exist on type 'Element | Element[] | Vue | Vue[]'. Property 'valid...的更多相关文章

  1. 解决TS报错Property 'style' does not exist on type 'Element'

    在使用queryselector获取一个dom元素,编译时却报错说property 'style' does not exist on type 'element'. 原因:这是typescript的 ...

  2. React报错之Property 'X' does not exist on type 'HTMLElement'

    正文从这开始~ 总览 在React中,当我们试图访问类型为HTMLElement 的元素上不存在的属性时,就会发生Property 'X' does not exist on type 'HTMLEl ...

  3. React报错之Property 'value' does not exist on type 'HTMLElement'

    正文从这开始~ 总览 当我们试图访问一个类型为HTMLElement的元素上的value属性时,会产生"Property 'value' does not exist on type 'HT ...

  4. react中使用typescript时,error: Property 'setState' does not exist on type 'Home'

    问题描述: 我在react中用typescript时,定义一个Home组件,然后在组件里用setState时会有这样一个报错:(如图)Property 'setState' does not exis ...

  5. React报错之Property 'value' does not exist on type EventTarget

    正文从这开始~ 总览 当event参数的类型不正确时,会产生"Property 'value' does not exist on type EventTarget"错误.为了解决 ...

  6. vue element-ui typescript tree报错 === Property 'getCheckedNodes' does not exist on type 'Element | Element[] | Vue | Vue[]'.

    import { Tree } from 'element-ui' const ref = <Tree>this.$refs.tree ref.getCheckedNodes()

  7. [ts] Property 'aaa' does not exist on type 'Window' 解决办法

    第一种: (window as any).aaa 第二种: declare global { interface Window { aaa: any; } } window.aaa = window. ...

  8. TypeScript 错误property does not exist on type Object

    TypeScript 错误property does not exist on type Object 在TypeScript中如果按JS的方式去获取对象属性,有时会提示形如Property 'val ...

  9. 在angular项目中使用bootstrap的tooltip插件时,报错Property 'tooltip' does no t exist on type 'JQuery<HTMLElement>的解决方法和过程

    在angular4的项目中需要使用bootstrap的tooltip插件. 1. 使用命令安装jQuery和bootstrap npm install bootstrap jquery --save ...

随机推荐

  1. yii2 vendor/bower/jquery/dist not exist

    查看 vendor 文件夹,只有bower-asset文件夹 手动修改 bower-asset 为bower 倒也可以,yii2项目每次 composer install 成功之后,每次重命名这个文件 ...

  2. windows2012 日志查看过程

    Windows2012界面修改好造成有些人不知道在哪里查找windows 日志 我这边截图描述一下 1. 2.输入 命令  eventvwr.msc 3.弹出 windows 事件查看器 4.若需要  ...

  3. CSIC_716_20191101【编程语言、变量、垃圾回收机制】

    编程语言分类:机器语言.汇编语言.高级语言. 机器语言:机器能直接识别的程序语言或指令代码(二进制指令),勿需经过翻译,每一操作码在计算机内部都有相应的电路来完成它 汇编语言:比机器语言略高级,用英文 ...

  4. phonegap 开发指南系列(3) ----在Eclipse中Android开发环境搭建

      前提条件:已在Eclipse中安装好Android SDK 和 ADT. 1.下载PhoneGap,解压. 2.用Eclipse新建一个安卓项目. 3.将phoneGap解压包里的Android文 ...

  5. 【JZOJ3424】粉刷匠

    description 赫克托是一个魁梧的粉刷匠,而且非常喜欢思考= = 现在,神庙里有N根排列成一直线的石柱,从1到N标号,长老要求用油漆将这些石柱重新粉刷一遍.赫克托有K桶颜色各不相同的油漆,第i ...

  6. thinkphp 模块化设计

    一个完整的ThinkPHP应用基于模块/控制器/操作设计,并且,如果有需要的话,可以支持多入口文件和多级控制器. ThinkPHP3.2采用模块化的架构设计思想,对目录结构规范做了调整,可以支持多模块 ...

  7. dos中文乱码怎么办?

    最简单的方法: 通过 chcp命令改变代码页,UTF-8的代码页为65001 即chcp 65001 chcp 65001  就是换成UTF-8代码页 chcp 936 可以换回默认的GBK chcp ...

  8. 概率+后效性处理——cf930B好题

    之前题目看错了.. 先用双倍字符串处理后效性 首先要确定一个结论:如果原串s中相距为d的ch1和ch2只有一对,那么如果第一个翻开ch1,第二个翻开ch2,就能确定k 现在要求的是当我们第一次翻开的是 ...

  9. (转)Android 升级 ADT 之后报错之一 case语句 .

    转:http://blog.csdn.net/wchinaw/article/details/7325641 下面文章大意是指:在一般的Android项目中,R类的常量都是用final定义的,但ADT ...

  10. JAVA POI XSSFWorkbook导出扩展名为xlsx的Excel,附带weblogic 项目导出Excel文件错误的解决方案

    现在很多系统都有导出excel的功能,总结一下自己之前写的,希望能帮到其他人,这里我用的是XSSFWorkbook,我们项目在winsang 用的Tomcat,LInux上用的weblogic服务器, ...