在Vue中定义方法或者属性时,因为粗心疏忽可以能会报该错误

[Vue warn]: Property or method "search" 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.

属性或方法“search”不是在实例上定义的,而是在呈现期间引用的。通过初始化该属性,确保该属性是反应性的,无论是在data选项中,还是对于基于类的组件。

可以检查三个方面:

1.是否将该属性或方法放在 methods 中,尤其是methods 有没有写对。

2.在methods中是否定义了该方法。

3.如果方法中传了参数,这个参数有没有在 data 中 设置默认值

以上三方面没有解决:methods 中的方法的放的位置是否正确,括号太多了,可能发生嵌套错误。

Vue报错:Property or method "XXX" is not defined on the instance but referenced during render. Make sure that this property is reactive...的更多相关文章

  1. Property or method "previewUrl" 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,

    Property or method "previewUrl" is not defined on the instance but referenced during rende ...

  2. Property or method "openPageOffice" 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

    Property or method "openPageOffice" is not defined on the instance but referenced during r ...

  3. Property or method "xxx" is not defined on the instance but referenced during render

    是xxx中的data写成date了,因此报错. 这个错误属于粗心

  4. Property or method "cancleInput" is not defined on the instance but referenced during render.

    因为我的点击事件,是动态添加上去的 报错如标题  [Vue warn]: Property or method "cancleInput" is not defined on th ...

  5. vue.js使用vue-preview做移动端缩略图时报错Property or method "$preview" is not defined

    报错的详细信息为: Property or method "$preview" is not defined on the instance but referenced duri ...

  6. vue报错信息

    1.Property or method "xxx" is not defined on the instance but referenced during render. 原因 ...

  7. Vue报错笔记

    1.错误信息:[Vue warn]: Property or method "object" is not defined on the instance but referenc ...

  8. Vue 报错Error in render: “TypeError: Cannot read properties of null (reading ‘xxx’)” found in

    前端vue报错 [Vue warn]: Error in render: "TypeError: Cannot read properties of null (reading 'name' ...

  9. Vue报错 type check failed for prop “xxx“. Expected String with value “xx“,got Number with value ‘xx‘

    vue报错    [Vue warn]: Invalid prop: type check failed for prop "name". Expected String with ...

随机推荐

  1. 如何利用css进行网页布局

    一.单列布局(类似于搜狐网站) 如: 代码为: 二.两列布局 1.固定宽度 代码为: 2.自适应 代码为: 三.三列布局 代码为: 四.混合布局 就是在前面的基础上,在进行划分块 如: 代码为:

  2. LC 425. Word Squares 【lock,hard】

    Given a set of words (without duplicates), find all word squares you can build from them. A sequence ...

  3. LC 302. Smallest Rectangle Enclosing Black Pixels【lock, hard】

    An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black ...

  4. GsonForamt插件的使用

    第一步:在AS中安装GsonForamt插件 第二步:创建bean类 第三步: 在bean类体中做如下操作即可快速创建bean类 鼠标右击按图选择: 将需要解析的json字符串复制进去 设置界面:可以 ...

  5. 史上最全SVN 教程

    以下博文引用<https://blog.csdn.net/u013067756/article/details/73302758>,再此仅供学习和参考. Svn是什么? SVN(全称Sub ...

  6. vue-router懒加载

    require.ensure(dependencies:String [],callback:function(require),errorCallback:function(error),chunk ...

  7. Jconsole、JvisualVM无法连接Tomcat服务

    转载自:https://blog.csdn.net/qq_27790011/article/details/88799587 打开TomcatXw.exe找到java选项卡,添加以下参数 -Dcom. ...

  8. python-Web-django-图片上传

    建路由 创建方法 渲染页面 下载plupload插件.将插件放在项目根目录下的static下 写页面,引入js,写html 这个容器:放上传的图片 当上传后,需要ul里放3要素: 元素1:隐藏Inpu ...

  9. windows使用放大镜快速放大屏幕局部

    Win10系统自带放大镜有时真的是比较难使用的,但是如果你对他的快捷键有所了解之后就会感觉它其实也没有那么难,用户可以在使用完之后直接按快捷键将其关闭,一起看看吧. Win10系统放大镜快速关闭快捷键 ...

  10. 【POJ - 3126】Prime Path(bfs)

    Prime Path 原文是English 这里直接上中文了 Descriptions: 给你两个四位的素数a,b.a可以改变某一位上的数字变成c,但只有当c也是四位的素数时才能进行这种改变.请你计算 ...