Vue报错:Property or method "XXX" is not defined on the instance but referenced during render. Make sure that this property is reactive...
在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...的更多相关文章
- 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 ...
- 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 ...
- Property or method "xxx" is not defined on the instance but referenced during render
是xxx中的data写成date了,因此报错. 这个错误属于粗心
- 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 ...
- vue.js使用vue-preview做移动端缩略图时报错Property or method "$preview" is not defined
报错的详细信息为: Property or method "$preview" is not defined on the instance but referenced duri ...
- vue报错信息
1.Property or method "xxx" is not defined on the instance but referenced during render. 原因 ...
- Vue报错笔记
1.错误信息:[Vue warn]: Property or method "object" is not defined on the instance but referenc ...
- 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' ...
- 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 ...
随机推荐
- wait/notify模拟连接池
连接池中的连接可重复使用,减少每次新建和烧毁连接对资源的消耗,但连接池的容量大小也要设置合理,否则也会占用多余的资源.连接池的基本功能是获取连接和释放连接 连接在java中也是一个类,连接对象是一个普 ...
- Android应用开发编译框架流程与IDE及Gradle概要
1 背景 建议阅读本文之前先阅读<Android Studio入门到精通>和<Groovy脚本基础全攻略>及<Gradle脚本基础全攻略>三篇博客作为背景知识,这样 ...
- LC 655. Print Binary Tree
Print a binary tree in an m*n 2D string array following these rules: The row number m should be equa ...
- props的写法
简写 props: ['demo-first', 'demo-second'] 带类型 props: { 'demo-first': Number, 'demo-second': Number } 带 ...
- Angularjs E2E test Report/CoverageReport - 使用Gulp
上一篇(http://www.cnblogs.com/xiaoningz/p/7122633.html)使用grunt-protractor-coverage 做为覆盖率测试插件,如果项目的管理工具刚 ...
- Day6 && Day7图论
并查集 A - How Many Answers Are Wrong 题意:已知区间[1,n],给出m组数据,即[l,r]区间内数据之和为s,求错误数据的数量. 拿到这道题,真的没思路,知道用并查集, ...
- java:面向对象(接口(续),Compareble重写,Comparator接口:比较器的重写,内部类,垃圾回收机制)
接口: *接口定义:使用interface关键字 * [修饰符] interface 接口名 [extends 父接口1,父接口2...]{ * //常量的声明 * //方法的声明 * } *接口成员 ...
- monkey详解
Monkey是Android系统自带的一个命令行工具,用户主要是通过adb命令来启动Monkey,Monkey在运行时,会根据命令行参数的配置,生成伪随机事件流,并在Android设备上执行对应的测试 ...
- 引用Nuget包Microsoft.EntityFrameworkCore.Tools.DotNet报错
错误如下 解决方法 使用VS2017或更高版本在改项目右键,选择“编辑xxx.csproj”,并添加如下一句话,就可以成功引用改Nuget包 <PackageReference Include= ...
- 必须要掌握的linux目录路径知识
一./etc/sysconfig/network-scripts/ifcfg-en33 配置网络地址及GW等. 下面图片是一些常用的linux命令: nmtui(setup)---------- ...