Published on2018年2月25日One of the sources for assign has an enumerable key on the prototype chainReact在 react native 中拷贝对象遇“One of the sources for assign has an enumerable key on the prototype chain”错误。for 循环给 obj 赋值放入数组,使用 _.clone 后正常,之前用 {...obj} 或 Object.assign({}, obj) 会报错,改用 lodash 的 clone 就没问题。
Published on2018年2月16日10 种最常见的 Javascript 错误Web文章介绍了 10 种最常见的 Javascript 错误,包括 Uncaught TypeError 等,分别阐述其产生原因及解决办法,如在初始化状态、处理 DOM 元素等场景中易出现错误,还提到不同浏览器错误提示不同及相关解决方法,最后强调 Rollbar 的重要性。
Published on2018年2月16日nginx url跳转保留路径ProductTools文章介绍了将老域名 http://3inns.cn 映射到新域名 http://ningto.com 且保留路径的方法。在 nginx 中通过配置 `server` 段的 `rewrite` 规则实现,最后重启 nginx 使配置生效。
Published on2018年1月9日QTableView多选cppQt介绍了 QTableView 多选,需了解 setSelectionBehavior 和 setSelectionMode 接口。初始化后用特定代码达不到要求,需使用 select 接口的新用法,封装了 selectMulRows 方法实现多选。