会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
巡匿精灵
博客园
首页
新随笔
联系
订阅
管理
2021年12月24日
react router 显示不出来的坑
摘要: 抓狂。查了react中文文档和论坛都没有找到错在哪。才发现路由相关 Switch 不能用了、component改成了element , {组件名} 改成了 {<组件名/>} 。。。 <Routes> <Route path="/" element={<App />} /> <Route path="
阅读全文
posted @ 2021-12-24 17:52 巡匿精灵
阅读(264)
评论(0)
推荐(0)
2021年12月10日
curry
摘要: 实现函数的科里化-- 原理 传入一个普通函数,函数依次传入参数,当函数的形参个数 >= 函数的实参个数时调用函数, 函数的形参个数为fn.length;当函数的实参小于形参时返回新的函数并将实参传递给新的函数,直到实参 >= 形参。使用了闭包和递归。 function curry (fn) { re
阅读全文
posted @ 2021-12-10 19:17 巡匿精灵
阅读(481)
评论(0)
推荐(0)
2021年10月12日
自定义文件可读流
摘要: const fs = require('fs') const { EventEmitter } = require('events') class MyFileReadStream extends EventEmitter { constructor (path, options = {}) { s
阅读全文
posted @ 2021-10-12 16:58 巡匿精灵
阅读(17)
评论(0)
推荐(0)
2021年10月7日
随便写写
摘要: 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 巡匿精灵
阅读(14)
评论(0)
推荐(0)
2021年5月9日
git action
摘要: 个人设置(用户账号下面的settings) - Developer settings - Personal access tokens 项目 - Settings - Secrets 本地项目,创建 .github/workflows/ci.yml 本地项目,package.json 中增加 "ho
阅读全文
posted @ 2021-05-09 14:08 巡匿精灵
阅读(273)
评论(0)
推荐(0)
2021年4月9日
mac 安装mysql详细教程(安装包方式)地址
摘要: https://www.cnblogs.com/exmyth/p/13667104.html
阅读全文
posted @ 2021-04-09 11:48 巡匿精灵
阅读(208)
评论(0)
推荐(0)
2021年3月14日
模拟 Vue.assetRegisters(Vue) 部分功能
摘要: <!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 巡匿精灵
阅读(39)
评论(0)
推荐(0)
Vue.extend(options)小例子
摘要: 本例利用 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 巡匿精灵
阅读(144)
评论(0)
推荐(0)
2021年3月6日
VSCode快捷键(MacBook)
摘要: 摘抄 MacBook 的 vscode 快捷键以便查找。 全局 Command + Shift + P / F1 显示命令面板Command + P 快速打开Command + Shift + N 打开新窗口Command + W 关闭窗口 基本 Command + X 剪切(未选中文本的情况下,剪
阅读全文
posted @ 2021-03-06 11:30 巡匿精灵
阅读(203)
评论(0)
推荐(0)
2021年2月6日
promise async/await
摘要: async函数可以返回Promise,当函数返回值时,Promise返回肯定结果,当async函数抛出异常时,Promise返回否定结果。await关键字用于在async函数内部强制等待Promise返回结果(暂停其他处理)。如果在函数前加await关键字,浏览器将强制等待Promise的返回结果。
阅读全文
posted @ 2021-02-06 11:16 巡匿精灵
阅读(26)
评论(0)
推荐(0)
下一页
公告