- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 react Children使用排坑
项目A react 版本 ^15.1.0 包裹组件,为子组件添加通用功能 需求:图片加载完成前,使用默认图片 遇到问题: 无法给reactObject添加props //参数1 需要复制的reactObject type => reactObject //参数2 需要添加的props type => object React.cloneElement(child, { onClick: () => { }, testProps: 'aaa' }) 实例
2020-08-18 17:56:03
671
原创 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
286
原创 清除鼠标默认行为和鼠标左键&右键&中建事件判断
window.onload = function(){ //去掉默认的contextmenu事件,否则会和右键事件同时出现。 document.oncontextmenu = function(e){ e.preventDefault(); }; window.onmousedo...
2019-11-20 18:23:21
531
原创 切换淘宝镜像(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
3185
空空如也
git提交代码失败,暂存区文件被还原,修改过的代码消失了
2021-06-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅