摘要:
git提交代码到github的时候遇到了一个问题 错误大致是说连接到github的时候超时了,这个超时是你的代理出了点问题,在git上用几个命令就能够很快搞定。 git config --global --unset http.proxy git config --global --unset ht 阅读全文
摘要:
sass-loader版本问题引发的错误:options has an unknown property 'prependData'. These properties are valid 当前版本如下: "sass": "^1.32.7", "sass-loader": "^12.0.0", 原来 阅读全文
摘要:
一、relative依据自身定位 二、absolute依据最近一层的定位元素定位 定位元素有: relative、absolute、fixed body (向上查找没有找到定位元素,就会依据body定位) 三、案例 <!DOCTYPE html> <html> <head> <meta charse 阅读全文
摘要:
错误如下图: 依赖版本: npm版本是8.0以上的 问题原因:npm 8 以上会检查一些包的对应关系。 大佬给的解决方案如下: 遇到这种情况,建议重装就好,npm 8 以上会检查一些包的对应关系,之前有可能没有安装好,有的依赖互相有问题,就会出现这样的错误。 1 、删除 node_modules 以 阅读全文
摘要:
在.eslintrc.js中添加rules配置 // .eslintrc.js "rules": { "@typescript-eslint/ban-types": [ "error", { "extendDefaults": true, "types": { "{}": false } } ] } 阅读全文
摘要:
vue组件中监听document加载完成 created() { const that = this; that.timer = setInterval(() => { if (document.readyState 'complete') { that.toImage(); window.clea 阅读全文
摘要:
1、查看本机TypeScript版本,可以使用npm view typescript version 2、查看TypeScript所有可以使用的版本,npm view typescript versions 3、如果想要查看typescript不同环境下的版本,可以使用npm info typesc 阅读全文
摘要:
Element.getBoundingClientRect() 方法返回元素的大小及其相对于视口的位置。 如果是标准盒子模型,元素的尺寸等于width/height + padding + border-width的总和。如果box-sizing: border-box,元素的的尺寸等于 width 阅读全文
摘要:
命令设置用户变量:setx PATH "%PATH%;C:\Software\node-v14.17.1-win-x64" 阅读全文
摘要:
const toString = Object.prototype.toString; export function is(val: unknown, type: string) { return toString.call(val) `[object ${type}]`; } export fu 阅读全文