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

  1. [Bug]Object reference not set to an instance of an object.

    引言 今天在客户这儿,由一个问题导致,需求的变化,不得不修改代码,在记录日志中出现该问题. 原因 通过id查找相关信息,没有判断是否为null,集合是否有数据. Object reference no ...

  2. js destructuring assignment bug

    js destructuring assignment bug https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Op ...

  3. JS Object Deep Copy & 深拷贝

    JS Object Deep Copy & 深拷贝 针对深度拷贝,需要使用其他方法 JSON.parse(JSON.stringify(obj));,因为 Object.assign() 拷贝 ...

  4. JS Object Deep Copy & 深拷贝 & 浅拷贝

    JS Object Deep Copy & 深拷贝 & 浅拷贝 https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Refe ...

  5. js & object & prototype & __proto__ & prototype chain

    js & object & prototype & proto & prototype chain constructor prototype === instance ...

  6. 调试:'Object reference note set to an instance of an object.'

    今天调试代码遇到一个奇怪的问题,每次调试到 var files = new List<string>()这一行代码,总是报错:System.NullReferenceException: ...

  7. ArcGIS AddIN异常之:object reference not set to an instance of an object

    异常出现在 frmDownload frd = new frmDownload(); frd.ShowDialog(); 在ArcMap中能正常弹出窗体,点击按钮时显示此异常:object refer ...

  8. JS浮点数运算Bug

    JS浮点数运算Bug的解决办法(转) 37.5*5.5=206.08 (JS算出来是这样的一个结果,我四舍五入取两位小数) 我先怀疑是四舍五入的问题,就直接用JS算了一个结果为:206.0849999 ...

  9. Java中对不变的 data和object reference 使用 final

    Java中对不变的 data和object reference 使用 final 许多语言都提供常量数据的概念,用来表示那些既不会改变也不能改变的数据,java关键词final用来表示常量数据.例如: ...

随机推荐

  1. Floodlight下发流表过程分析

    https://blog.csdn.net/vonzhoufz/article/details/32166445 当一个packet到达openflow交换机,会进行流表的匹配,如果没有找到相应的流表 ...

  2. Java并发工具类(四):线程间交换数据的Exchanger

    简介 Exchanger(交换者)是一个用于线程间协作的工具类.Exchanger用于进行线程间的数据交换.它提供一个同步点,在这个同步点两个线程可以交换彼此的数据.这两个线程通过exchange方法 ...

  3. 学生管理之Bootstrap初体验

    Bootstrap,来自 Twitter,是目前比较受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加快捷. Bootstra ...

  4. nginx 部署前期一定要关闭selinux

    nginx 报错: 1389#1389: *40 "/home/data1/index.html" is forbidden (13: Permission denied), cl ...

  5. 表格 - bootStrap4常用CSS笔记

    [表格标签]   <table> 定义一个表格 <thead> 表格表头 <tbody> 表格主体内容 <tr> 行 <th> 表头列 &l ...

  6. happybase(TSocket read 0 bytes)

    关于报错happybase 是使用python连接hbase的一个第三方库,目前基于thrift1 .在使用过程中经常碰到报错 TTransportException(type=4, message= ...

  7. POJ 3164 Sunscreen (挑战程序设计竞赛的练习题)

    题目:https://vjudge.net/problem/POJ-3614 思路参考这个:https://blog.csdn.net/qq_25576697/article/details/7657 ...

  8. virtualbox命令行启动虚拟机和关闭虚拟机

    C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm 虚拟机名字 --type headlessC:\Program Files\Orac ...

  9. SQL IF while 游标

    -- if语句使用示例 declare @a int set @a=1 begin print @a =@a+1 end else begin print 'noooo' end -- while语句 ...

  10. paste命令详解

    基础命令学习目录首页 原文链接:https://blog.csdn.net/u011341352/article/details/52806312 个人分类: linux   paste命令和cut命 ...