摘要: 抓狂。查了react中文文档和论坛都没有找到错在哪。才发现路由相关 Switch 不能用了、component改成了element , {组件名} 改成了 {<组件名/>} 。。。 <Routes> <Route path="/" element={<App />} /> <Route path=" 阅读全文
posted @ 2021-12-24 17:52 巡匿精灵 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 实现函数的科里化-- 原理 传入一个普通函数,函数依次传入参数,当函数的形参个数 >= 函数的实参个数时调用函数, 函数的形参个数为fn.length;当函数的实参小于形参时返回新的函数并将实参传递给新的函数,直到实参 >= 形参。使用了闭包和递归。 function curry (fn) { re 阅读全文
posted @ 2021-12-10 19:17 巡匿精灵 阅读(442) 评论(0) 推荐(0) 编辑
摘要: const fs = require('fs') const { EventEmitter } = require('events') class MyFileReadStream extends EventEmitter { constructor (path, options = {}) { s 阅读全文
posted @ 2021-10-12 16:58 巡匿精灵 阅读(6) 评论(0) 推荐(0) 编辑
摘要: function * gen () { let result = yield axios.get('https://api.github.com/users/github') console.log(result.bio) } let g = gen() g.next().value.then(v= 阅读全文
posted @ 2021-10-07 15:30 巡匿精灵 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 个人设置(用户账号下面的settings) - Developer settings - Personal access tokens 项目 - Settings - Secrets 本地项目,创建 .github/workflows/ci.yml 本地项目,package.json 中增加 "ho 阅读全文
posted @ 2021-05-09 14:08 巡匿精灵 阅读(233) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/exmyth/p/13667104.html 阅读全文
posted @ 2021-04-09 11:48 巡匿精灵 阅读(205) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-03-14 17:15 巡匿精灵 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 本例利用 Vue.extend() 实现左侧input 框中输入文本,动态加载组件。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content=" 阅读全文
posted @ 2021-03-14 10:23 巡匿精灵 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 摘抄 MacBook 的 vscode 快捷键以便查找。 全局 Command + Shift + P / F1 显示命令面板Command + P 快速打开Command + Shift + N 打开新窗口Command + W 关闭窗口 基本 Command + X 剪切(未选中文本的情况下,剪 阅读全文
posted @ 2021-03-06 11:30 巡匿精灵 阅读(158) 评论(0) 推荐(0) 编辑
摘要: async函数可以返回Promise,当函数返回值时,Promise返回肯定结果,当async函数抛出异常时,Promise返回否定结果。await关键字用于在async函数内部强制等待Promise返回结果(暂停其他处理)。如果在函数前加await关键字,浏览器将强制等待Promise的返回结果。 阅读全文
posted @ 2021-02-06 11:16 巡匿精灵 阅读(22) 评论(0) 推荐(0) 编辑