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. Wannafly挑战赛25C 期望操作数

    Wannafly挑战赛25C 期望操作数 简单题啦 \(f[i]=\frac{\sum_{j<=i}f[j]}{i}+1\) \(f[i]=\frac{f[i]}{i}+\frac{\sum_{ ...

  2. Redis 为什么使用单进程单线程方式也这么快

    Redis 采用的是基于内存的采用的是单进程单线程模型的 KV 数据库,由 C 语言编写.官方提供的数据是可以达到100000+的 qps.这个数据不比采用单进程多线程的同样基于内存的 KV 数据库 ...

  3. 原来new的java对象不是所有的都存在堆内存

    JVM在晚期(运行期)优化时,使用到一种技术----逃逸分析. 补充说明:逃逸分析在1999年就已提出,但是JDK1.6才实现逃逸分析.而且,这项优化目前仍不成熟,仍有很大改进余地. 这是大坑啊,目前 ...

  4. Linux中的mysql指令

    如何启动/停止/重启MySQL一.启动方式1.使用 service 启动:service mysqld start2.使用 mysqld 脚本启动:/etc/inint.d/mysqld start3 ...

  5. jmeter功能按钮介绍

    Jmeter本来是做性能测试的,所以有很多监听器都是针对性能的,随后边的不断发展,可以应用到接口自动化等测试工作上. 面板的文件菜单中一般都是打开.保存.新建测试的,如下图: 保存时可以直接ctrl+ ...

  6. static笔记

    目录 1. static概括 2. static特点 1. 被static修饰的成员变量属于类,不属于这个类的某个对象. 2.被static修饰的成员可以并且建议通过类名直接访问 3. static注 ...

  7. Java中final与 static final 修饰的常量的区别

    喵喵开车,新手上路,多多关照.有任何错误请在评论区指出. ...........................................我是万恶的分界线( • ̀ω•́ )✧......... ...

  8. Discuz3.3精仿小米风格整站模板制作——1、新建模板方案

    术语说明: 模板——模板是一堆按照规定命名方式的html文件,用于指定整个论坛不同页面的外观. 标签——标签和模板共同作用以实现论坛换肤功能,其中标签主要控制页面显示什么数据,显示多少条等. 风格—— ...

  9. ReLU——Deep Sparse Rectifier Neural Networks

    1. 摘要 ReLU 相比 Tanh 能产生相同或者更好的性能,而且能产生真零的稀疏表示,非常适合自然就稀疏的数据. 采用 ReLU 后,在大量的有标签数据下,有没有无监督预训练模型取得的最好效果是一 ...

  10. VisionPro相机操作类

    在网站上看到这个,保存下来,以后用到了,再看一下.谢谢原创的分享! #region 获得相机信息方法 /// <summary> /// 公有静态方法,查找单个相机.例如“Basler” ...