vonic 中遇到这么个问题, 一直提示我未定义, 可是明明有定义

var tab={
message:{
number:'',
title:''
}
}
var id= {
template: '#id',
data: function(){
return tab;
},
created: function () {
//感觉问题就是这
var self = this; },
methods: {
showComplaintsDetail:function(item){
var self = this;
self.tab.message= item; //这样写就会报那个错误
}
}
}

后来发现可能是var self = this; 的问题, 结果去掉后就正常了,或者把tab去掉也可以恢复正常, 感觉就是self获取的this不一样, 有些self中包含tab, 有些包含的是tab中的属性,

这里先简单记一下, 有机会在深入了解

reportComplaints.js: Uncaught TypeError: Cannot read property 'message' of undefined的更多相关文章

  1. jquery.dataTables.min.js: Uncaught TypeError: Cannot read property 'style' of undefined

    原因:datatable表格内容有操作列,而表头没有定义操作列 少写了一行:<th>操作</th>

  2. VM1059 bootstrap-table.min.js:7 Uncaught TypeError: Cannot read property 'classes' of undefined

    参考链接:https://blog.csdn.net/liuqianspq/article/details/81868283 1.阳光明媚的下午,我在写CRUD,让数据传到前端的时候,解析的时候报错了 ...

  3. index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined

    使用 webpack 编译 Vue 项目时出现报错: index.js:13 Uncaught TypeError: Cannot read property 'split' of undefined ...

  4. Three.js three.js Uncaught TypeError: Cannot read property 'getExtension' of null

    在调试Three.js执行加载幕布的时候,突然爆出这个错误three.js Uncaught TypeError: Cannot read property 'getExtension' of nul ...

  5. 【jQuery】jquery中 使用$('#parentUid').attr(parentUid);报错jquery-1.11.3.min.js:5 Uncaught TypeError: Cannot read property 'nodeType' of undefined

    jquery中 使用$('#parentUid').attr(parentUid);报错jquery-1.11.3.min.js:5 Uncaught TypeError: Cannot read p ...

  6. js 报错 Uncaught TypeError: Cannot read property 'trim' of undefined

    jquery Uncaught TypeError: Cannot read property 'trim' of undefined 报错原因及解决方案 $.trim() 函数用于去除字符串两端的空 ...

  7. underscore.js定义模板遇到问题:Uncaught TypeError: Cannot read property 'replace' of undefined

    代码正确缩进位置如下, extend "layout" block 'content',-> div ->'nihao' script id:"Invoice ...

  8. JS报错:Uncaught TypeError: Cannot set property ‘nTf‘ of undefined

    在使用DataTable时,遇到以下报错: Uncaught TypeError: Cannot set property 'nTf' of undefined ... ... 初步排查后发现是< ...

  9. SignalR代理对象异常:Uncaught TypeError: Cannot read property 'client' of undefined 推出的结论 SignalR 简单示例 通过三个DEMO学会SignalR的三种实现方式 SignalR推送框架两个项目永久连接通讯使用 SignalR 集线器简单实例2 用SignalR创建实时永久长连接异步网络应用程序

    SignalR代理对象异常:Uncaught TypeError: Cannot read property 'client' of undefined 推出的结论   异常汇总:http://www ...

随机推荐

  1. camera测试之MTF

    1.MTF介绍 MTF(Modulation Transfer Function)模量传递函数.MTF是camera成像对比度和分辨率的综合表现.从另一个角度来看,camera成像过程可以简单看成下图 ...

  2. IIS Tomcat共享80端口

    为什么有这种需求, 原因是这样的, 公司有一个Java的web项目,在另一台服务器A上,最近老板一时兴起,想把他合并到这台稳定点的服务器B上,服务器B上使用IIS来寄宿asp.net 网站, 怎么办呢 ...

  3. Android Studio 活动的生命周期

    Activity 类中定义了7个回调方法,覆盖了活动的活动周期的每一环节 onCreate()  活动第一次创建的时候调用 onStart() 这个活动由不可见变为可见的时候调用 onResume() ...

  4. Centos 7.6配置nginx反向代理,直接yum安装

    一,实验介绍 利用三台centos7虚拟机搭建简单的nginx反向代理负载集群, 三台虚拟机地址及功能介绍 192.168.2.76    nginx负载均衡器 192.168.2.82    web ...

  5. [日常] HTTP连接管理

    HTTP连接管理: 1.误解的Connection首部 当http报文经过中间客户端到服务端中间的各种代理设备时,对标签中列出的头信息进行删除,close是事务结束后关掉此条连接 2.消除串行化的时延 ...

  6. Contest2089 - 湖南多校对抗赛(2015.05.31) Swipe(csu1648)

    Problem E: Swipe Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 100  Solved: 15[Submit][Status][Web ...

  7. Elasticsearch系列(1):认识Elasticsearch

    官方定义 Elasticsearch 是一个实时的分布式搜索分析引擎, 它能让你以一个之前从未有过的速度和规模,去探索你的数据. 它被用作全文检索.结构化搜索.分析以及这三个功能的组合. Elasti ...

  8. Spring 与 SpringMVC (或许不完整)

    一.什么是Spring Spring是一个开源的控制反转和面向切面(AOP)的容器框架.它的主要目的是使现有技术更加易用,推荐编码最佳实现,从而简化企业的开发. 提:使用Spring的好处有以下几项: ...

  9. Springboot@Configuration和@Bean详解

    Springboot@Configuration和@Bean详解 一.@Configuration @Target({ElementType.TYPE}) @Retention(RetentionPo ...

  10. 求二叉树第n层节点数

    在知乎看到今日头条的一个面试题“求二叉树第n层节点数”:https://zhuanlan.zhihu.com/p/25671699,想到了这样一个解法,欢迎大家交流 我的解法采用递归的思想,从0层开始 ...