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. webform中jQuery获取checkboxlist的value值

    后台绑定 /首先,在绑定checkboxlist时,为ListItem每个对象添加一个alt属性,值保存对应的value值,代码如下 if(dt != null && dt.Rows. ...

  2. Redis 设计与实现:数据库

    本文的分析都是基于 Redis 6.0 版本源码 redis 6.0 源码:https://github.com/redis/redis/tree/6.0 服务器中的数据库 Redis 服务器将绝大部 ...

  3. 4.自定义view-进度条控件

    1.效果 2.实现原理 画圆,画圆弧,画文字 外部控制进度,通过invalidate()方法更新 核心代码: @Override protected void onDraw(Canvas canvas ...

  4. CyclicBarrier回环屏障深度解析

    1. 前沿 从上一节的CountDownLatch的学习,我们发现其只能使用一次,当state递减为0后,就没有用了,需要重新新建一个计数器.那么我们有没有可以复用的计数器呢?当然,JUC包给我们提供 ...

  5. Kibana查询语言(KQL)

    一.前言 现在大多数的公司都会使用ELK组合来对日志数据的收集.存储和提供查询服务,这里就不介绍什么是ELK了,只介绍一些EKL中的查询,也就是K(kibana). 查询数据库,如果是MySQL,那么 ...

  6. jQuery报错:Uncaught ReferenceError: $ is not defined解决方法

    原因及解决办法 1:加载jquery失败,就再次确认jquery的路径是否正确. 2:如果jquery的路径没有问题,那么就可能是浏览器在解释你的js语句时,还没有加载jquery库.所以,你需要将加 ...

  7. Docker容器安装nginx基本步骤Yum版

    首先我们来科普一下nginx: Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务.Nginx是由伊戈尔·赛索耶夫为俄罗斯访问 ...

  8. 01 . Go之从零实现Web框架(框架雏形, 上下文Context,路由)

    设计一个框架 大部分时候,我们需要实现一个 Web 应用,第一反应是应该使用哪个框架.不同的框架设计理念和提供的功能有很大的差别.比如 Python 语言的 django和flask,前者大而全,后者 ...

  9. git基础-远程仓库的使用

    远程仓库的使用 为了能在任意 Git 项目上协作,你需要知道如何管理自己的远程仓库. 远程仓库是指托管在因特网或其他网络中的你的项目的版本库. 你可以有好几个远程仓库,通常有些仓库对你只读,有些则可以 ...

  10. 日常ie兼容问题(持续整理)

    1.关于new Date()格式为何要转成y/m/d格式 IE不会识别时间状态为"y-m-d"的形式,如果获取的new Date("2020-05-01") 那 ...