摘要: 问题:使用nvm管理node版本,尝试将npm 从6.14.13运行npm install -g npm@7.20.0升级报错,如下: npm ERR! code EEXISTnpm ERR! path d:\nvm\nodejs\npm.cmdnpm ERR! Refusing to delete 阅读全文
posted @ 2022-10-24 10:55 lucy123 阅读(1429) 评论(0) 推荐(0) 编辑
摘要: <el-input @input="debounce()" ></el-input> // 防抖处理 private timer: any = '' private debounce(data?: any) { let that = this if (this.timer) { clearTimeo 阅读全文
posted @ 2021-01-28 18:33 lucy123 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 引入七牛插件 import * as qiniu from 'qiniu-js' // 处理图片 private transformCanvas(file: any, cb: any) { const img = new Image() img.onload = function () { cons 阅读全文
posted @ 2020-07-31 10:35 lucy123 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 实现渐变色的虚线 border: 1px dashed #fff; background: linear-gradient(to right, #73d13d, #ff4d4f); background-origin: border-box; 阅读全文
posted @ 2020-07-31 10:32 lucy123 阅读(64) 评论(0) 推荐(0) 编辑
摘要: <el-upload :action="$store.state.baseURL+'/commonFile/upload.do'" list-type="picture-card" :on-success="handleSuccess" :on-preview="handlePictureCardP 阅读全文
posted @ 2020-07-27 21:51 lucy123 阅读(757) 评论(0) 推荐(0) 编辑
摘要: slice() 第一个参数代表开始位置,第二个参数代表结束位置的下一个位置,截取出来的字符串的长度为第二个参数与第一个参数之间的差;若参数值为负数,则将该值加上字符串长度后转为正值;若第一个参数等于大于第二个参数,则返回空字符串. substring() 第一个参数代表开始位置,第二个参数代表结束位 阅读全文
posted @ 2020-07-22 17:51 lucy123 阅读(997) 评论(0) 推荐(0) 编辑
摘要: gitignore规则不生效 .gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。 解决方法就是先把本地缓存删除(改变成未track状态),然后再提交: git rm -r --cached . git add . gi 阅读全文
posted @ 2020-06-24 14:25 lucy123 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 查询很多资料。发现写法很复杂,如果要求不高,可以试试以下方法 router /#/serve#serve5 methods: { getLocal() { var hash = window.location.hash; var index = hash.lastIndexOf("#"); var  阅读全文
posted @ 2020-05-13 18:24 lucy123 阅读(1395) 评论(0) 推荐(1) 编辑
摘要: 原因:在路由中添加了相同的路由。解决:重写路由的push方法 在src/router/index.js 里面import Router from 'vue-router'下面写入下面方法即可 /** * 重写路由的push方法 */ const routerPush = Router.prototy 阅读全文
posted @ 2020-04-15 16:30 lucy123 阅读(346) 评论(0) 推荐(0) 编辑
摘要: let newArray=[...new Set( Array )] 阅读全文
posted @ 2019-12-26 16:30 lucy123 阅读(168) 评论(0) 推荐(0) 编辑