在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. ORA-00600: internal error code, arguments: [kqludp2], [0x08D226918], [0], [], [], [], [], [], [], [], [], []

    问题描述: 1)report builder + xml publisher 做的报表,报表提交后报黄色警告,输出文件是XML格式,日志提示如下: +--------- 1) POST-PROCESS ...

  2. windows修复失效图标

    taskkill /im explorer.exe /fcd /d %userprofile%\appdata\localdel iconcache.db /astart explorer.exeex ...

  3. ubuntu安装dockers过程:

    1. 先对系统进行更新 1.1 apt-get upgrade 1.2 去中国关于dockers的网站 http://get.daocloud.io/ 1.3 安装docker curl -sSL h ...

  4. JavaScript基本入门03

    目录 JavaScript 入门基础 03 JavaScript构造函数 常用事件和事件处理函数 小练习 数据类型之间的差异性 数组 介绍 创建 数组的常规使用 数组的length属性 数组当中常见的 ...

  5. C#编程 socket编程之tcp服务器端和客户端

    基于Tcp协议的Socket通讯类似于B/S架构,面向连接,但不同的是服务器端可以向客户端主动推送消息. 使用Tcp协议通讯需要具备以下几个条件: (1).建立一个套接字(Socket) (2).绑定 ...

  6. HCL试验八

    pc1:配置静态ip地址,掩码,网关 路由器R1:配置ip地址192.168.1.254 24;配置dhcp int gi 0/0 ip add 192.168.1.254 24 qu dhcp en ...

  7. v8 google 下载及编译

    ubuntu环境下进行 参考文档: http://code.google.com/p/v8/wiki/BuildingWithGYP (一) 源码下载及编译 1, Google v8 官网:http: ...

  8. "在指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配" 问题总结

    最近C#连接ODBC数据源时,总是提示"[Microsoft][ODBC 驱动程序管理器] 在指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配",百度查询之后才知道原来是 ...

  9. NOIp2018D1T2 货币系统【分析&完全背包】

    题目传送门 看到题目瞬间想起某凯的疑惑,感觉不会做....然后观察样例可以知道,去掉原来货币系统中能够被其他币值凑出来的数就是答案(样例分析法),然后就完事了(huaji). 简单理解一下吧: 首先, ...

  10. ctype.h头文件

    定义了一批C语言字符分类函数(C character classification functions),用于测试字符是否属于特定的字符类别,如字母字符.控制字符等等.既支持单字节(Byte)字符,也 ...