草庐IT

set_ccopt_property

全部标签

javascript - [Vue 警告] : Error in render function: "TypeError: Cannot read property ' first_name' of null"

我有以下Navigation.vue组件:{{user.first_name}}import{mapActions,mapGetters}from'vuex'exportdefault{name:'hello',methods:{...mapActions(['myAccount'])},mounted:function(){if(localStorage.getItem('access_token')){this.myAccount()}},computed:{...mapGetters(['user'])}}此代码返回:[Vuewarn]:Errorinrenderfunction

javascript - 未捕获的类型错误 : Cannot read property 'offsetWidth' of null

这个问题在这里已经有了答案:GoogleMAPAPIUncaughtTypeError:Cannotreadproperty'offsetWidth'ofnull(26个答案)OffsetWidthnullorundefined(Can'tfindsolution)[closed](1个回答)关闭8年前。不幸的是,我在发布这个问题之前阅读了几个线程,我找不到适合我的问题的答案。这是我的代码片段-->functionpopulateIframe(id){varifrm=document.getElementById(id);ifrm.src="business_data_to_excel

c# - JavaScript 运行时错误 : Unable to get property 'msie' of undefined or null reference

我刚刚尝试更改我对母版页的jqueryui引用。我只在InternetExplorer上收到上述错误。我在Firefox和Chrome上没有收到错误。这是抛出错误的jquery代码:returna.browser.msie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b我有下面的母版页:请让我知道我需要做什么?我尝试将jquery引

javascript - JsHint - 隐藏此消息 : ES5 option is now set per default

我正在使用gulp-jshint,下面的错误消息很烦人:ES5optionisnowsetperdefault如何删除它? 最佳答案 它只是告诉您这是默认设置,因此您无需将其添加为选项。查看.jshintrc文件并删除"es5":true。http://jslinterrors.com/es5-option-is-now-set-per-default 关于javascript-JsHint-隐藏此消息:ES5optionisnowsetperdefault,我们在StackOverfl

javascript - Angular2 - 类型错误 : Cannot read property 'Id' of undefined in (Typescript)

我收到以下错误:angular2.dev.js:23925EXCEPTION:TypeError:Cannotreadproperty'Id'ofnullin[{{product.Id}}inProductEditComponent@0:68]抛出://Product-edit.component.ts:import{Component}from'angular2/core';import{IProduct}from'./product'import{ProductService}from'./product.service'import{RouteParams}from'angula

javascript - ionic 2 : Set interval

我尝试在.ts文件中设置一个间隔,但我不明白如何在间隔中使用同一文件中的函数。解释:我的间隔设置:this.task=setInterval(function(){this.refreshData();},300);我的函数在同一个ts文件中:refreshData():void{console.log('update...');}当我在我的设备上运行时,出现此错误:04-1910:38:57.53521374-21374/com.ionicframework.app722890I/chromium:[INFO:CONSOLE(79432)]"TypeError:this.refres

javascript - react - 类型错误 : Cannot read property 'props' of undefined

我正在尝试创建一个能够删除列表中项目的点击事件,但是当我点击它时,我得到“类型错误:无法读取未定义的属性‘props’”。我尽量坚持使用ES6,而且我很确定在某处绑定(bind)“this”是一件好事,但我尝试了很多地方但都没有成功。importReact,{Component}from'react';import'./App.css';classAppextendsComponent{render(){return();}}classStreetFighterextendsComponent{constructor(props){super(props);this.state={ch

javascript - 对象属性在 chrome.storage.sync.set 后变为空

我正在构建一个chrome扩展,遇到了一个我无法解决的错误。问题是单个对象属性在chrome的存储中变为null。我正在通过以下方式对此进行测试:console.log("pre-storage",settings);varobj={};obj[storage_key]=settings;chrome.storage.sync.set(obj,function(){chrome.storage.sync.get(storage_key,function(data){console.log("post-storage",data[storage_key]);});});这是输出:pre-

javascript - jQuery 数据表 : iDisplayLength set to -1 to show all rows

我使用jQueryDatatables并希望通过来自服务器的ajax收听包含我所有条目的表格。一切都很完美。我的意思是,我得到数据并可以在表格中显示它们。我只有一个问题。我想一次显示所有行/条目。我在谷歌上搜索过,所有人都说,我只需要将iDisplayLength设置为-1。但如果我这样做,我只有1个条目/行(显示总共50个条目中的1个中的1个)。知道我做错了什么吗?这是我初始化表的代码:varoTable=$("#roles").dataTable({"bServerSide":true,"sAjaxSource":"/data","iDisplayLength":-1,"aoSea

javascript - 导入 anuglar2/forms 导致 "Cannot read property ' 未定义注释”

我正在尝试创建简单的表单,如http://angularjs.blogspot.no/2015/03/forms-in-angular-2.html中所述,但是当我添加从'angular2/forms'导入{forms,required};在崩溃中TypeError:Cannotreadproperty'annotations'ofundefinedTypeError:Cannotreadproperty'annotations'ofundefinedatReflectionCapabilities.System.register.execute.$__export.annotatio