2023年2月14日
摘要: 使用--force或--legacy-peer-deps可解决这种情况。 --force 会无视冲突,并强制获取远端npm库资源,当有资源冲突时覆盖掉原先的版本。 --legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;它告诉 NPM 忽略项目中引入 阅读全文
posted @ 2023-02-14 13:37 写最骚的代码 阅读(593) 评论(0) 推荐(0) 编辑
  2023年1月16日
摘要: 1. 分别打开https://tool.chinaz.com/dns/?type=1&host=github.com&ip=和https://tool.chinaz.com/dns/?type=1&host=github.global.ssl.fastly.net&ip 2. macOs系统中打开终 阅读全文
posted @ 2023-01-16 16:31 写最骚的代码 阅读(100) 评论(0) 推荐(0) 编辑
  2022年12月22日
摘要: 参考大佬的vue3写法 https://segmentfault.com/a/1190000042096606 自己改成的vue2写法: 1.封装组件PasswordInput <template> <el-dialog title="" :visible.sync="visible" width= 阅读全文
posted @ 2022-12-22 10:49 写最骚的代码 阅读(636) 评论(0) 推荐(0) 编辑
  2022年10月25日
摘要: 错误写法: let total = arr.reduce((prev, next) => prev + next.acc); 正确写法: let total = arr.reduce( (prev, next) => prev + next.acc, 0 ); 需要提供第二个参数来reduce为ac 阅读全文
posted @ 2022-10-25 10:11 写最骚的代码 阅读(83) 评论(0) 推荐(0) 编辑
  2022年8月2日
摘要: 1、全局安装nrm npm i -g nrm mac上使用 sudo npm i -g nrm 2、查看可用的源地址 nrm ls 3、切换源地址 nrm use taobao 阅读全文
posted @ 2022-08-02 13:48 写最骚的代码 阅读(144) 评论(0) 推荐(0) 编辑
  2022年5月6日
摘要: 借鉴:https://blog.csdn.net/qq_41499782/article/details/122363330 大佬是vue3版本的,我借鉴大佬修改成vue2版本 <template> <div class="content-table"> <template v-if="tableD 阅读全文
posted @ 2022-05-06 16:04 写最骚的代码 阅读(1333) 评论(0) 推荐(0) 编辑
  2022年4月7日
摘要: 现在还在内测阶段不收费,趁还免费快用起来吧,以后商用可能会收费! 博主目前用的vscode编码工具 1、去插件库搜索:GitHub Copilot,安装。 2、 vscode左下角github账号登录 3、登录后管理信任扩展 4、然后去官网申请测试资格,在页面的最下方 https://copilot 阅读全文
posted @ 2022-04-07 11:01 写最骚的代码 阅读(248) 评论(0) 推荐(0) 编辑
  2021年12月22日
摘要: 1.cdn配置地址 完全遵循package.json的版本号: 打包上线后,发现组件插槽内默认的内容不显示,经过将近一天的排查,最终在node_moudle里发现了问题 当时排查问题时,我也想到了版本问题,我重新初始化了一个项目,但是package和node_module还是不对应。可能是我的操作在 阅读全文
posted @ 2021-12-22 19:06 写最骚的代码 阅读(93) 评论(1) 推荐(0) 编辑
摘要: 1.配置public下的index.html,通过htmlwebpackplugin动态注入脚本和样式 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" 阅读全文
posted @ 2021-12-22 11:12 写最骚的代码 阅读(2990) 评论(0) 推荐(1) 编辑
摘要: 1.安装compression-webpack-plugin npm install --save-dev compression-webpack-plugin 2.vue.config.js配置 const CompressionPlugin = require("compression-webp 阅读全文
posted @ 2021-12-22 10:21 写最骚的代码 阅读(1450) 评论(0) 推荐(0) 编辑