- 博客(12)
- 收藏
- 关注
原创 安装typescript指定版本
卸载typescriptnpm uninstall -g typescript安装指定版本npm install -g typescript@加上版本号例如: npm install -g typescript@3.2.1安装最新版本npm install -g typescript```
2022-02-15 17:04:13
4592
原创 vue 在使用img时动态绑定本地图片:src不显示图片,绑定线上图片就可以
动态绑定本地图片时如下图写法在图片地址外面写个require(图片地址)
2022-01-19 16:52:36
1602
原创 node的淘宝镜像下载路径cnpm
1.先运行npm install -g cnpm --registry=https://registry.npm.taobao.org2.在下载需要的cnpm install
2021-10-27 10:07:51
286
原创 npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has
安装react时一直报错1.使用create-react-app构建react项目失败解决办法:下载时跟换为淘宝镜像下载npm config set registry https://registry.npm.taobao.org初始化项目:npx create-react-app my-react2.上面方法不可以就使用第二种方法:npm config set registry https://registry.npmjs.org/初始化项目:npx create-react-app my
2021-06-16 15:17:29
532
原创 [Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel‘ event. Consider marki
警告信息如下:[Violation] Added non-passive event listener to a scroll-blocking ‘mousewheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive.解决办法:1、直接在项目终端下载安装npm install default-passive-events2、在main.js中引入就可以了import "defaul
2021-06-15 19:40:13
3034
原创 [Vue warn]: Error in mounted hook: “TypeError: Cannot read property ‘init‘ of undefined“
出现以下问题是在mounted()中使用官方示例的时候报了以下错误:Error in mounted hook: “TypeError: Cannot read property ‘init’ of undefined”或 Cannot read property ‘init’ of undefined解决方案:放弃import,改用require的方式引入库这里是引用import echarts from 'echarts //把这种引入方式改为下面的方式let echarts =
2021-06-15 16:12:08
5400
2
原创 fatal: unable to access ‘https://gitee.com/xiaocharendage/vue_shop.git/‘: Failed to connect to 127.0
第一个问题git remote add origin************** fatal: remote origin already exists.(报错远程起源已经存在。)fatal: unable to access第二个问题是’https://gitee.com/xiaocharendage/vue_shop.git/’: Failed to connect to 127.0.0.1 port 61422: Connection refused连接127.0.0.1失败,端口61422:.
2021-06-02 19:09:35
1065
原创 ERROR in Error: Child compilation failed: Module not found: Error: Can‘t resolve
遇到这种问题就是在index打包的时候htmlwebpackplugin 生成的模板路径格式错误。修改配置下模板路径如下
2021-05-07 12:02:02
4621
2
原创 npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found:
npm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency treenpm ERR!npm ERR! Found: webpack@5.36.2npm ERR! node_modules/webpacknpm ERR! peer webpack@"^4.0.0 || ^5.0.0" from webpack-dev-middleware@3.7.3npm ERR! node_modules/webpack-de
2021-05-06 16:56:05
4061
原创 什么是闭包?实现方法?作用?缺点?
什么是闭包?实现方法?作用?缺点?一、什么是闭包? 闭包是指能够读取其他函数内部变量的函数二、实现方法 :在函数的内部,在定义一个函数,把内部函数作为返回值复制代码: function a() { var num = 10; return function () { console.log(num); } } var b = a();
2021-03-25 21:09:44
873
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人