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. 巧用 Python 找工作(资料在文末)

    前言 近年来 Python 之火大家都有感而知,那亲们知道北京的 Python 开发岗位.运维开发岗位招聘地域都是如何分布的吗?薪水如何?是否有前景等等,这些数据呢直接通过招聘信息来了解到企业用人是最 ...

  2. 有关onpropertychange事件

    <div style="border:1px solid #fc0;height:24px;width:300px;" id="target">&l ...

  3. 按键精灵手机版多点找色,图片对比 by <剑行洪荒> 忠哥

    代码: Do    Dim ret1,ret2    Delay 500    ret1 = CmpColor(76,72, "153274", 0.9)    ret2 = Cm ...

  4. 阿超的烦恼 javaScript篇

    幼儿园级1-100随机数运算 实现目标 1.点击随机生成两个数并进项随机的四则运算. 2.答案暂时隐藏,等孩子做完题后点击答案处显示答案. 3.背景设置的卡通些,激发孩子阅读兴趣........... ...

  5. 快速上手IOT视觉化开发工具Node-RED

    作者:何信昱 现在有越来越多非专业背景但有创造热诚的Maker,想要进入物联网领域大展身手,但常常苦于无法撰写艰深难懂的程序代码,以及想要连接各种硬件与时下最流行的社群软件,却不知道如何使用开放给开发 ...

  6. PageHelper分页插件使用

    mybatis的分页插件jar包: 配置方法: 在mybatis配置文件中加下面代码 <plugin interceptor="com.github.pagehelper.PageIn ...

  7. 10分钟了解 pandas - pandas官方文档译文 [原创]

    10 Minutes to pandas 英文原文:https://pandas.pydata.org/pandas-docs/stable/10min.html 版本:pandas 0.23.4 采 ...

  8. ats缓存规则

    一. 用户访问过程:1. ats收到一个用户对web对象的请求;2. 使用该地址, ats尝试着在其对象数据库(缓存)中用被请求对象的地址来定位该对象;3. 如果对象在缓存中, ats会检查该对象是否 ...

  9. 安装配置heapster(包含influxdb,grafana)

    前提:已搭建好kubernetes集群.安装完dashboard 默认安装的dashboard无法展示集群的度量指标信息,此时就需要安装heapster插件 Heapster 插件使用包含三部分内容: ...

  10. day12生成器

    迭代器 __iter__() 获取迭代器 __next__() 下一个 生成器 本质就是迭代器 两种方式写生成器 1. 生成器函数 2. 生成器表达式 生成器函数 函数内部有yield. yield返 ...