位置:- 正文

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

编辑:rootadmin
Cannot read properties of undefined (reading ‘validate‘)“ 1、注意两个地方    1、ref前面 加冒号“:”,还是不加冒号。    2、this.$refs[value].validate()=>(),更改为this.$refs[value].validate()=>(),

推荐整理分享Cannot read properties of undefined (reading ‘validate‘)“(cannot read properties null),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:cannot read propertiea of null,cannotreadpropertiesofnull翻译,cannot read propertiea of null,cannot read properties of,Cannot read properties of null,Cannot read properties of null,cannot read properties,cannotreadpropertiesofnull翻译,内容如对您有帮助,希望把文章链接给更多的朋友!

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

2、示范代码

<template>

<div>

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

</el-form>1

</div>

</template>

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

<script>

data(){},

methids:{

 makeSure() {

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

                if(valid){

            })

                }

}

</script>

 

本文链接地址:https://www.jiuchutong.com/zhishi/287324.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/287325.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络