Typescript in vue 先定义,再引用,完美解决问题 let form: any = this.$refs.form form.validate((valid: Boolean) => {})