美文网首页
Property or method "res" is not

Property or method "res" is not

作者: 无崖老师 | 来源:发表于2019-12-14 16:39 被阅读0次

    Property or method "res" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property

    百度的译文如下

    属性或方法“res”未在实例上定义,但在呈现期间被引用。通过初始化该属性,确保该属性是被动的,无论是在数据选项中,还是对于基于类的组件
    

    Vue中报这样的错误,让我找找了足足大半天,快要吐血了....其实就是使用某一个属性但是没有在,data中定义,故报错!

    所以,必须在下面定义才好用!!!
    <input :select='res'>

    data(){
        return {
            res:null
        }
    }
    

    相关文章

      网友评论

          本文标题:Property or method "res" is not

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