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. idea 开发javaee 时,出现访问的文件和源文件不一样,没有正常更新的解决方案

    这是因为我配置的idea debug 运行模式 输出的文件在 out 和 target 目录下,因为idea本身的原因,导致这两个目录没有及时更新, 导致前端在访问时的页面源码和ide中的一直不一样, ...

  2. 180803-Spring定时任务高级使用篇

    Spring定时任务高级使用篇 前面一篇博文 <Spring之定时任务基本使用篇> 介绍了Spring环境下,定时任务的简单使用姿势,也留了一些问题,这一篇则希望能针对这些问题给个答案 I ...

  3. PHP核心技术——异常和错误处理

    PHP只有手动抛出异常后才能捕获异常 $a = null; try { $a = 5/0; echo $a,PHP_EOL; } catch (exception $e) { $e -> get ...

  4. 出现 org.springframework.beans.factory.BeanCreationException 异常的原因及解决方法

    1 异常描述 在从 SVN 检出项目并配置完成后,启动 Tomcat 服务器,报出如下错误: 2 异常原因 通过观察上图中被标记出来的异常信息,咱们可以知道 org.springframework.b ...

  5. Spring入门学习笔记(4)——JDBC的使用

    目录 Spring JDBC框架概览 JdbcTemplate类 配置数据源 数据访问对象(Data Access Object,DAO) 执行SQL命令 Spring JDBC框架概览 使用传统的J ...

  6. ubuntu下Open vSwitch安装

    ubuntu下Open vSwitch安装 有关Open vSwitch的安装,网上有各种的教程资料,但一些已经过时,按照网上的教程,花费了大量时间,都没能安装成功.于是,通过查阅官方安装教程以及综合 ...

  7. Vue+webpack项目中,运行报错Cannot find module 'chalk'的处理

    刚开始用vue + webpack新建项目,在github上下载了一个示例,输入npm init >>>npm run dev 后报错 Cannot find module 'cha ...

  8. 亚马逊如何变成 SOA(面向服务的架构)

    . 亚马逊公司不仅是世界最大的网络书店,还是世界最大的云服务商.它是怎么实现从电商到云商的转变呢? 一切都是CEO杰夫·贝索斯促成的,他对市场有着超乎常人的理解和预见. 2. 2000年前后,贝索斯有 ...

  9. 时间戳使用的bug,你见过么

    博主本人前几天给公司项目里写了个禁言和解除禁言的功能,项目中涉及到对时间的处理,因为学得时候也没很注意,就按自己的思路去写了,运行起来发现了一个天大的bug,就是写的延后一年尽然,刚开始就执行了,而且 ...

  10. js备忘录3

    JavaScript也有类型转换 js中的获取指定位数的方法 +和-的转换方向不同 在JavaScript中首先给变量赋值数字,然后再给变量赋值字符串是合法的 这点和Java有些区别 在函数体内声明变 ...