Cannot read properties of undefined (reading ‘validate‘)“

1、注意两个地方

    1、ref前面 加冒号“:”,还是不加冒号。

    2、this.$refs[value].validate()=>(),更改为this.$refs[value].validate()=>(),

     不排除this.$refs[value].validate()=>(),有时候不会报错

2、示范代码

<el-form ref="value" :model="getAppForm" label-width="120px" :rules="rules"

1

data(){},

methids:{

 makeSure() {

            this.$refs.value.validate((valid)=>{

                if(valid){

            })

                }

}

Cannot read properties of undefined (reading ‘validate‘)“

Cannot read properties of undefined (reading ‘validate‘)“

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/f8504621d0.html