js & Object reference bug
js & Object reference bug
bug
object ref bug
onClickButton (type = ``) {
let {
publishDate: publishTime,
newsTitle: xwbt,
mediaSource: mtcc,
columnCategory: lmfl,
// priority: yxj,
processingStatus: dataStatus,
processingPersonnel: handleUser,
newsId,
}= this.commonFilters;
// update
let commonFiltersPagination = this.commonFilters;
// object ref bug ???
this.commonFiltersPagination = commonFiltersPagination;
console.log(`this.commonFiltersPagination bug =`, JSON.stringify(this.commonFiltersPagination, null, 4));
let {
// current,
size,
} = this.pagination;
// init
this.pagination.current = 1;
console.log(`this.pagination.current =`, this.pagination.current);
let options = {
publishTime,
xwbt,
mtcc,
lmfl,
// yxj,
dataStatus,
handleUser,
newsId,
current: 1,
size,
};
this.getCommonTableDatas(options);
},
solution & Object 解构赋值
OK
onClickButton (type = ``) {
let {
publishDate: publishTime,
newsTitle: xwbt,
mediaSource: mtcc,
columnCategory: lmfl,
// priority: yxj,
processingStatus: dataStatus,
processingPersonnel: handleUser,
newsId,
}= this.commonFilters;
// update
// let commonFiltersPagination = this.commonFilters;
// object ref bug ???
// this.commonFiltersPagination = commonFiltersPagination;
// this.commonFiltersPagination = commonFiltersPagination;
this.commonFiltersPagination = {...this.commonFilters};
console.log(`this.commonFiltersPagination bug =`, JSON.stringify(this.commonFiltersPagination, null, 4));
let {
// current,
size,
} = this.pagination;
// init
this.pagination.current = 1;
console.log(`this.pagination.current =`, this.pagination.current);
let options = {
publishTime,
xwbt,
mtcc,
lmfl,
// yxj,
dataStatus,
handleUser,
newsId,
current: 1,
size,
};
this.getCommonTableDatas(options);
},
notes
明白了,第一次没有出发 click事件,对象没有绑定
js & Object reference bug的更多相关文章
- [Bug]Object reference not set to an instance of an object.
引言 今天在客户这儿,由一个问题导致,需求的变化,不得不修改代码,在记录日志中出现该问题. 原因 通过id查找相关信息,没有判断是否为null,集合是否有数据. Object reference no ...
- js destructuring assignment bug
js destructuring assignment bug https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Op ...
- JS Object Deep Copy & 深拷贝
JS Object Deep Copy & 深拷贝 针对深度拷贝,需要使用其他方法 JSON.parse(JSON.stringify(obj));,因为 Object.assign() 拷贝 ...
- JS Object Deep Copy & 深拷贝 & 浅拷贝
JS Object Deep Copy & 深拷贝 & 浅拷贝 https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Refe ...
- js & object & prototype & __proto__ & prototype chain
js & object & prototype & proto & prototype chain constructor prototype === instance ...
- 调试:'Object reference note set to an instance of an object.'
今天调试代码遇到一个奇怪的问题,每次调试到 var files = new List<string>()这一行代码,总是报错:System.NullReferenceException: ...
- ArcGIS AddIN异常之:object reference not set to an instance of an object
异常出现在 frmDownload frd = new frmDownload(); frd.ShowDialog(); 在ArcMap中能正常弹出窗体,点击按钮时显示此异常:object refer ...
- JS浮点数运算Bug
JS浮点数运算Bug的解决办法(转) 37.5*5.5=206.08 (JS算出来是这样的一个结果,我四舍五入取两位小数) 我先怀疑是四舍五入的问题,就直接用JS算了一个结果为:206.0849999 ...
- Java中对不变的 data和object reference 使用 final
Java中对不变的 data和object reference 使用 final 许多语言都提供常量数据的概念,用来表示那些既不会改变也不能改变的数据,java关键词final用来表示常量数据.例如: ...
随机推荐
- Floodlight下发流表过程分析
https://blog.csdn.net/vonzhoufz/article/details/32166445 当一个packet到达openflow交换机,会进行流表的匹配,如果没有找到相应的流表 ...
- Java并发工具类(四):线程间交换数据的Exchanger
简介 Exchanger(交换者)是一个用于线程间协作的工具类.Exchanger用于进行线程间的数据交换.它提供一个同步点,在这个同步点两个线程可以交换彼此的数据.这两个线程通过exchange方法 ...
- 学生管理之Bootstrap初体验
Bootstrap,来自 Twitter,是目前比较受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加快捷. Bootstra ...
- nginx 部署前期一定要关闭selinux
nginx 报错: 1389#1389: *40 "/home/data1/index.html" is forbidden (13: Permission denied), cl ...
- 表格 - bootStrap4常用CSS笔记
[表格标签] <table> 定义一个表格 <thead> 表格表头 <tbody> 表格主体内容 <tr> 行 <th> 表头列 &l ...
- happybase(TSocket read 0 bytes)
关于报错happybase 是使用python连接hbase的一个第三方库,目前基于thrift1 .在使用过程中经常碰到报错 TTransportException(type=4, message= ...
- POJ 3164 Sunscreen (挑战程序设计竞赛的练习题)
题目:https://vjudge.net/problem/POJ-3614 思路参考这个:https://blog.csdn.net/qq_25576697/article/details/7657 ...
- virtualbox命令行启动虚拟机和关闭虚拟机
C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm 虚拟机名字 --type headlessC:\Program Files\Orac ...
- SQL IF while 游标
-- if语句使用示例 declare @a int set @a=1 begin print @a =@a+1 end else begin print 'noooo' end -- while语句 ...
- paste命令详解
基础命令学习目录首页 原文链接:https://blog.csdn.net/u011341352/article/details/52806312 个人分类: linux paste命令和cut命 ...