上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: export function numberToColor(text, color = '#635BFF', size = '12px') { let reg = /(\d+)/g; return text.replace(reg, `<span style="color: ${color};siz 阅读全文
posted @ 2022-12-20 14:48 PromiseOne 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 在使用命令 git commit -m '提交信息' 将本地代码提交到远程仓库时候, 如果项目安装了 per-commit,则会在Git键入提交信息前进行代码风格检查,如果代码不符合相应规则,则报错。 解决方法有两种: 1、简单粗暴,删除掉pre-commit钩子 进入项目的.git文件夹(隐藏文件 阅读全文
posted @ 2022-12-05 15:46 PromiseOne 阅读(3352) 评论(0) 推荐(0) 编辑
摘要: 1.实例的__proto__ 属性 非标准ie浏览器不支持 let arr = [1,2,3]; console.log('__proto__',arr.__proto__ Array.prototype)2.实例的 constructorlet arr = [1,2,3];console.log( 阅读全文
posted @ 2022-09-28 20:21 PromiseOne 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1、cd : 改变目录。 2、cd . . 回退到上一个目录,直接cd进入默认目录 3、pwd : 显示当前所在的目录路径。 4、ls(ll): 都是列出当前目录中的所有文件,只不过ll(两个ll)列出的内容更为详细。 5、touch : 新建一个文件 如 touch index.js 就会在当前目 阅读全文
posted @ 2022-08-31 11:18 PromiseOne 阅读(17) 评论(0) 推荐(0) 编辑
摘要: // 写法一 let [cache, cache2] = await Promise.all([cachePromise, cachePromise2]); // 写法二 let Promise= cachePromise(); let Promise2= cachePromise2(); let 阅读全文
posted @ 2022-08-17 17:26 PromiseOne 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Warning: React does not recognize the `xxXxx` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it 阅读全文
posted @ 2022-08-16 16:53 PromiseOne 阅读(5158) 评论(0) 推荐(1) 编辑
摘要: 原因:组件返回了个不是<></>的东西 原先代码: export default class Index extends React.PureComponent { render() { return reactDOM.createPortal( <div>传送内容</div>, document. 阅读全文
posted @ 2022-07-30 18:35 PromiseOne 阅读(787) 评论(0) 推荐(0) 编辑
摘要: Object.keys(Array.from(Array(100))) 阅读全文
posted @ 2022-07-29 17:33 PromiseOne 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 问题根源: 罪魁祸首是git的一个配置属性:core.autocrlf 由于历史原因,windows下和linux下的文本文件的换行符不一致。 Windows在换行的时候,同时使用了回车符CR(carriage-return character)和换行符LF(linefeed character) 阅读全文
posted @ 2022-04-11 16:44 PromiseOne 阅读(4698) 评论(0) 推荐(1) 编辑
摘要: function getCaption(obj, text){ let index = obj.lastIndexOf(text) + text.length-1; obj = obj.substring(index+1,obj.length); return obj; } let str=" 执法 阅读全文
posted @ 2022-03-30 14:17 PromiseOne 阅读(3019) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页