- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 react Children使用排坑
项目A react 版本 ^15.1.0包裹组件,为子组件添加通用功能需求:图片加载完成前,使用默认图片遇到问题: 无法给reactObject添加props//参数1 需要复制的reactObject type => reactObject//参数2 需要添加的props type => objectReact.cloneElement(child, { onClick: () => { }, testProps: 'aaa'}) 实例
2020-08-18 17:56:03
596
原创 git log 中文乱码问题
1. 配置一下git的字符集git config --global core.quotepath false git config --global gui.encoding utf-8 git config --global i18n.commit.encoding utf-8 git config --global i18n.logoutputencoding utf-8设置powershell的字符集当前powershell窗口修改$env:LESSCHARSET='utf-8'所
2020-07-26 16:14:34
228
原创 清除鼠标默认行为和鼠标左键&右键&中建事件判断
window.onload = function(){ //去掉默认的contextmenu事件,否则会和右键事件同时出现。 document.oncontextmenu = function(e){ e.preventDefault(); }; window.onmousedo...
2019-11-20 18:23:21
477
原创 切换淘宝镜像(cnpm)&从淘宝镜像切回npm
使用cnpm(淘宝镜像)定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:$ npm install -g cnpm --registry=https://registry.npm.taobao.org或者你直接通过添加 npm 参数 alias 一个新命令:alias cnpm="npm --registry=https://registry.npm.taobao...
2019-11-15 10:36:26
3072
空空如也
git提交代码失败,暂存区文件被还原,修改过的代码消失了
2021-06-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人