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, by initializing the property.

报错原因:视图中上使用了该变量(previewUrl),但初始化时没有定义该变量!

 <img class="" :src="previewUrl" alt="">

export default {
  name:'index',
  data(){
          return {
           previewUrl:" ", //定义后即可解决
     }
  }
}

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,的更多相关文章

  1. 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 ...

  2. 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 th ...

  3. 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 ...

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

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

  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. GraphQL: Object doesn't support property or method 'from'

    From: https://github.com/graphql/graphiql/issues/688 psyCodelist commented 11 days ago Hi, Thank you ...

  7. python遇到动态函数---TypeError: unbound method a() must be called with A instance as first argument (got nothing instead)

    TypeError: unbound method a() must be called with A instance as first argument (got nothing instead) ...

  8. .NET手记-Autofac进阶(属性和方法注入 Property and Method Injection)

    尽管构造函数参数注入是传递参数值给当前构造的组件的优先方式,但是你也可以使用属性或者方法注入来提供参数值. 属性注入使用可写入的变量而不是构造函数参数来完成注入.方法注入则通过方法来设置依赖项. 属性 ...

  9. IE11 - Object doesn't support property or method 'includes'

    IE不支持字符串的includes()方法:可以用indexOf()替换: includes()方法返回true和false; var str = "asdklmn": if(st ...

随机推荐

  1. Python利用xlutils统计excel表格数据

    假设有像上这样一个表格,里面装满了各式各样的数据,现在要利用模板对它进行统计每个销售商的一些数据的总和.模板如下: 代码开始: 1 #!usr/bin/python3 2 # -*-coding=ut ...

  2. 5分钟教你在Linux下安装VMware

    如果我们只有一台笔记本,又想要搭建一个小集群,怎么办?虚拟机帮你实现梦想,市面上较为常用的虚拟机软件有VMware.VirtualBox.Xen.KVM.hyper-v等,本文主要介绍如何在Linux ...

  3. HCIP --- BGP综合实验

    实验要求: 实验拓扑: 一.配置IP地址 L:代表环回地址(loop back 0) Y:代表业务网段的地址(loop back 1) 二.因为BGP基于IGP之上,给AS 2内配置OSPF 在R2上 ...

  4. springboot实现mybaitis逆向工程

    springboot实现mybaitis逆向工程 首先引入依赖,一共需要两个依赖(一个是mybaits依赖,一个是mybatis逆向工程插件) <dependency> <group ...

  5. ProGuard使用文档

    介绍 是一个对于Java字节码的免费的压缩器,优化器,混淆器和审核器: l  它检测并删除未使用的类,字段,方法和属性. l  它优化字节码并删除未使用的指令. l  它重命名其余类.字段和方法使用短 ...

  6. 敏捷史话(一):用一半的时间做两倍的事——Scrum之父Jeff Sutherland

    普通的人生大抵相似,传奇的人生各有各的传奇.Jeff就是这样的传奇人物,年近80的他从来没有"廉颇老矣尚能饭否"的英雄迟暮,不久前还精神矍铄地与好几百名中国学生进行线上交流,积极回 ...

  7. 5个有趣且不必要的 JavaScipt 技巧

    前一段时间,我创建了一个标题为"7个可爱的Web开发技巧"的帖子.在这里,我描述了一些有趣的技巧,您可以使用3种主要的Web技术之一来实现这些技巧-html,css和JavaScr ...

  8. Linux系统下qt程序运行找不到IGL

    linux下使用QT5运行时出现两个问题: cannot find -lGL collect2:error:ld returned 1 exit status 这是因为系统缺少链接库,执行两条命令即可 ...

  9. SQL Server批量向表中插入多行数据语句

    因自己学习测试需要,需要两个有大量不重复行的表,表中行数越多越好.手动编写SQL语句,通过循环,批量向表中插入数据,考虑到避免一致问题,设置奇偶行不同.个人水平有限,如有错误,还望指正. 语句如下: ...

  10. python数据基本运算处理===循环

    一.循环语句 1.while while的循环条件为True,即每次正常循环完毕都会返回判断一次条件 只有读到break才能立刻彻底结束循环,break只能结束本层循环 continue也能立即结束本 ...