摘要: 1. Settings ==> Developer settings ==> Personal access tokens ==> Generate new token 生成新的token 2. https://github.com/xxx.git 3.oauth2:xxxx@ (xxx是生成的to 阅读全文
posted @ 2021-11-22 18:08 honely1314 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 在git 进行 commit 时出现了 Git: .git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: No such file or directory 报错 在命令行里运行以下命令回车即可解决。 npx husky inst 阅读全文
posted @ 2021-11-18 16:59 honely1314 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: Enzyme是一个用于React的JavaScript测试实用程序,它使得更容易断言,操作和遍历您的React组件的输出,它模拟了jQuery的API,非常直观,易于使用和学习。 整理相当API为中文,所以资料都是官方API翻译而已,代码块以最新的粘贴过来 它提供三种测试方法: shallow re 阅读全文
posted @ 2021-07-26 16:48 honely1314 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 先看axios请求处理,下载文件 this.$axios.get(api.exportMortgageOrderExcelVisit, { params: params, responseType: 'blob'}) .then(res => { let url = window.URL.creat 阅读全文
posted @ 2020-08-26 18:58 honely1314 阅读(1817) 评论(0) 推荐(1) 编辑
摘要: 需要用new RegExp代替// 如: num = num.replace(/(?<=\d\.\d{2})./, '');换成 let reg = new RegExp("(?<=\\d\\.\\d{2}).","g"); num = num.replace(reg, ''); 阅读全文
posted @ 2020-08-05 14:49 honely1314 阅读(2707) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2020-06-08 11:14 honely1314 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Object.create()方法创建一个新对象,使用现有的对象来提供新创建的对象的__proto__。 Object.create(proto[, propertiesObject]) 参数 proto 新创建对象的原型对象。 propertiesObject 可选。如果没有指定为 undefin 阅读全文
posted @ 2020-05-21 09:46 honely1314 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象复制到目标对象。它将返回目标对象。 const target = { a: 1, b: 2 ,c:3,e:6}; const source = { b: 4, c: 5 }; const returnedTarget = 阅读全文
posted @ 2020-05-21 09:24 honely1314 阅读(188) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <style> .img{ width: 450px; height: 300px; display: blo 阅读全文
posted @ 2020-05-21 08:50 honely1314 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 函数声明规则:必须指定一个函数名字 foo(); function foo() { console.log("函数声明") } 由于函数声明会被提升,所以调用函数可以在之前或之后调用 函数表达式规则:将函数赋值给一个变量 var foo = function () { console.log("函数 阅读全文
posted @ 2020-05-19 10:36 honely1314 阅读(2591) 评论(0) 推荐(0) 编辑