摘要: function removeNull(option) { if (!option) { return; } for (var attr in option) { if (option[attr] === null && attr !== 'teacherId') { delete option[attr]; ... 阅读全文
posted @ 2019-01-27 18:12 星陨的菲 阅读(2893) 评论(0) 推荐(0) 编辑
摘要: // 字符串的下划线格式转驼峰格式,eg:hello_world => helloWorld function underline2Hump(word) { return word.replace(/_(\w)/g, function (all, letter) { return letter.to 阅读全文
posted @ 2019-01-27 18:08 星陨的菲 阅读(626) 评论(0) 推荐(0) 编辑
摘要: (window as any).namespace 阅读全文
posted @ 2019-01-26 20:49 星陨的菲 阅读(820) 评论(0) 推荐(0) 编辑
摘要: // 需要安装的库yarn add raven-js --saveyarn add raven-for-redux --save // 在创建store的地方import * as Raven from "raven-js";import * as createRavenMiddleware fro 阅读全文
posted @ 2019-01-26 20:20 星陨的菲 阅读(2097) 评论(0) 推荐(0) 编辑
摘要: 之前一直用 crypto-js进行加密,新项目需要使用rsa加密,这里就专门找了下 npm i jsencrypt,然后页面头引入import JSEncrypt from 'jsencrypt';const encrypt = new JSEncrypt();encrypt.setPublicKe 阅读全文
posted @ 2019-01-26 15:43 星陨的菲 阅读(2966) 评论(0) 推荐(0) 编辑
摘要: 这是由于设置了openkey的原因。 由于业务需要设置openkey。 查看了Antd Pro的源码后发现,可以通过判断菜单在收起状态时,给Menu不设置openKeys值,这样就变为不受控组件,交给antd处理。 解决方案: //判断菜单是否处于收缩状态设置openkey const { open 阅读全文
posted @ 2019-01-24 13:12 星陨的菲 阅读(3455) 评论(0) 推荐(0) 编辑
摘要: webpack无法加载或理解CSS文件,但它会与工作的WebPack。为了告诉TypeScript,有些文件的结尾不是* .ts,你必须为相应的文件类型声明一个通配符模块。只需将它放在项目中包含的* .d.ts文件中即可。 阅读全文
posted @ 2019-01-23 11:21 星陨的菲 阅读(2449) 评论(0) 推荐(0) 编辑
摘要: css的三条属性。 overflow:hidden; //超出的文本隐藏 text-overflow:ellipsis; //溢出用省略号显示 white-space:nowrap; //溢出不换行 这三个是css的基础属性,需要记得 但是这样只对一行文本生效 css3解决了这个问题,解决方法如下: 阅读全文
posted @ 2018-12-26 15:30 星陨的菲 阅读(982) 评论(0) 推荐(0) 编辑