摘要: 1、简介: nrm(npm registry manager )是npm的镜像源管理工具,使用这个就可以快速地在 npm 源间切换。 2、全局安装: npm install -g nrm 3、使用: # 全局安装nrm $ npm install -g nrm # 添加私有库 $ nrm add v 阅读全文
posted @ 2022-02-28 16:29 zigood 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 高斯模糊是一种常见的效果(俗称毛玻璃效果),在CSS中使用filter、backdrop-filter属性均可实现。 这里主要介绍简单的方式:backdrop-filter: blur(); 简介: backdrop-filter 是使透过该层的底部元素模糊化 backdrop-filter属性可以 阅读全文
posted @ 2021-12-28 14:41 zigood 阅读(2588) 评论(0) 推荐(0) 编辑
摘要: 方法:使用伪类选择器处理 1、选择第n个,n代表数字 :nth-child(n){ } 2、选择列表中的偶数的标签 :nth-child(2n){} :nth-child(even){ } 3、选择列表中的奇数的标签 :nth-child(2n - 1){ } :nth-child(odd){ } 阅读全文
posted @ 2021-12-08 10:29 zigood 阅读(2722) 评论(0) 推荐(0) 编辑
摘要: 问题: TypeScript 文件tsc后,编译器提示重复声明: 网上搜集下,有人发现vscode编译后会提示: 无法重新声明块范围变量 函数实现重复 标识符重复 解决: 在项目根目录添加配置文件 tsconfig.json即可,空文件也可。 阅读全文
posted @ 2021-12-01 16:08 zigood 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 问题: 全局安装了Typescript运行环境,运行时报错:无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\tsc.ps1,因为在此系统上禁止运行脚本 处理: 1、以管理员身份运行powerShell(一定要以管理员身份打开): 2、运行命令行:s 阅读全文
posted @ 2021-12-01 16:06 zigood 阅读(256) 评论(0) 推荐(1) 编辑
摘要: 处理方式: git config --global core.autocrlf input git config --global core.safecrlf true Git中的AutoCRLF与SafeCRLF换行符问题 不同操作系统下,处理行尾结束符的方法是不同的: windows下:CRLF 阅读全文
posted @ 2021-12-01 15:55 zigood 阅读(2003) 评论(0) 推荐(0) 编辑
摘要: 问题:Git操作的过程中突然显示Another git process semms to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are 阅读全文
posted @ 2021-12-01 15:27 zigood 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 前言: 在进行窗口的resize、scroll,输入框内容校验等操作时,如果事件处理函数调用的频率无限制,会加重浏览器的负担,导致用户体验非常糟糕。 此时我们可以采用debounce(防抖)和throttle(节流)的方式来减少调用频率,同时又不影响实际效果。 函数防抖 函数防抖(debounce) 阅读全文
posted @ 2021-12-01 11:12 zigood 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 查看registry # npm命令 npm config get registry # yarn命令 yarn config get registry修改为淘宝镜像 # npm命令 npm config set registry http://registry.npm.taobao.org/ # 阅读全文
posted @ 2021-11-23 15:53 zigood 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 今天本地新拉取Git上的新项目,发现 git pull origin develop 提醒fatal: refusing to merge unrelated histories 查询结果:原因是两个分支是两个不同的版本,具有不同的提交历史 解决办法:( --allow-unrelated-hist 阅读全文
posted @ 2021-11-23 10:31 zigood 阅读(460) 评论(0) 推荐(0) 编辑