摘要: 1.在npm官网注册一个账号 2.在终端输入npm login登录账号 修改npm镜像方法 // 1.查询当前配置的镜像 npm get registry //https://registry.npmjs.org/ // 设置成淘宝镜像 npm config set registry http:// 阅读全文
posted @ 2022-03-16 16:33 又拿代码换酒钱 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 表格内容自滚动效果 // 拿到表格挂载后的真实DOM const table = this.$refs.table // 拿到表格中承载数据的div元素 const divData = table.bodyWrapper // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每10 阅读全文
posted @ 2022-01-10 10:43 又拿代码换酒钱 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 设计图效果 封装组件 <template> <div class="gauge" ref="chart"></div> </template> <script> export default { name: 'DrawGauge', data() { return { colorSource: [ 阅读全文
posted @ 2022-01-10 10:26 又拿代码换酒钱 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 封装绘制八边形函数 export function drawOctagon( id, width, height, text, startFillColor, endFillColor, startLineColor, endLineColor, textColor ) { function pol 阅读全文
posted @ 2022-01-10 10:17 又拿代码换酒钱 阅读(64) 评论(0) 推荐(0) 编辑
摘要: (技术栈 react) 在做项目的时候有两个页面吧,然后其中一个页面需要显示当前时间。 所以先写了一个函数获取当前的时间大致如下: import moment from "moment"; import ReactDOM from "react-dom"; //时间日期 export functio 阅读全文
posted @ 2021-05-25 10:00 又拿代码换酒钱 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 大概遇到了类似图片这样的问题,程序无明显红色报错,但是不能执行 根据po出来的解决办法在 module.exports增加配置stats: { children: false }后解决了 原文参考:https://www.cnblogs.com/guangzhou11/p/11427354.html 阅读全文
posted @ 2021-04-17 19:05 又拿代码换酒钱 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1.可以临时使用淘宝镜像 npm --registry https://registry.npm.taobao.org install 你想安装的npm包名称 解析:registry是npm 模块仓库提供了一个查询服务,叫做 registry 。以 npmjs.org 为例,它的查询服务网址是 ht 阅读全文
posted @ 2020-12-27 11:53 又拿代码换酒钱 阅读(1741) 评论(0) 推荐(0) 编辑
摘要: 直接上代码 根据webpack官网教程安装了相关的组件 npm install -D babel-loader @babel/core @babel/preset-env webpack 执行完成后,以下黄色标注代码被安装完成 package.json { "name": "meetwebpack" 阅读全文
posted @ 2020-12-25 01:01 又拿代码换酒钱 阅读(1857) 评论(0) 推荐(0) 编辑
摘要: 一、创建仓库 本地写好的代码文件 在仓库内创建同名仓库 二、同步文件(初始项目的话一般是Readme文件) 打开文件夹的Git Bash Here终端(安装了git 右键在文件夹内点击就有) 初始化文件(目的是引入.git文件,一般被隐藏,设置文件夹设置勾选隐藏的项目可查看) git init 链接 阅读全文
posted @ 2020-12-24 16:32 又拿代码换酒钱 阅读(94) 评论(0) 推荐(0) 编辑
摘要: JS代码 var staticx; var img = new Image(); img.src = "";//图片资源填入此处 //定义樱花 function Sakura(x, y, s, r, fn) { this.x = x; this.y = y; this.s = s; this.r = 阅读全文
posted @ 2020-12-11 20:08 又拿代码换酒钱 阅读(859) 评论(0) 推荐(0) 编辑