会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
吞天泡泡龙
首页
新随笔
新文章
联系
管理
订阅
2022年3月10日
正则表达式多次匹配结果不一致
摘要: 问题代码 const reg = /.*/g const arr = ['aaa','bb'] arr.forEach(i=>{ console.log('匹配结果:'+reg.test(i)) }) 匹配结果:true 匹配结果:false 原因 const reg = /.*/g为全局正则表达式
阅读全文
posted @ 2022-03-10 14:43 吞天泡泡龙
阅读(239)
评论(0)
推荐(0)
2022年3月4日
typescript——type和interface比较
摘要: 定义对象 interface UserInterface { name:string, age:number } type UserType = { name: string age: number } 定义函数 interface addInterface { (count:number):num
阅读全文
posted @ 2022-03-04 10:20 吞天泡泡龙
阅读(99)
评论(0)
推荐(0)
2022年3月1日
博客园自定义字体
摘要: cdn加载 若有免费或自己的字体cdn资源,可直接添加css @font-face { font-family: 'font-xk';//字体名 font-display: swap;//避免FOIT src: url("...");//资源链接 } 无资源继续往下 准备字体文件 如使用方式二加载字
阅读全文
posted @ 2022-03-01 17:07 吞天泡泡龙
阅读(442)
评论(2)
推荐(1)
2022年2月24日
冰墩墩threejs
摘要: 引入threejs script引入 <script src=".../three.min.js"></script> <script src=".../GLTFLoader.js"></script> <script src=".../OrbitControls.js"></script> 安装引
阅读全文
posted @ 2022-02-24 15:24 吞天泡泡龙
阅读(222)
评论(0)
推荐(0)
2022年1月11日
multiparty : bundary was not found
摘要: 问题背景 nodejs-expressjs处理post请求 使用apidoc自动生成接口文档 使用apidoc的“发送示例请求”功能测试接口 post接口选择form-data时后端获取不到body数据 原因 apidoc发送示例请求使用的是jquery的ajax,设置了Content-Type =
阅读全文
posted @ 2022-01-11 14:43 吞天泡泡龙
阅读(79)
评论(0)
推荐(0)
2021年12月25日
nextjs登录授权之next-auth
摘要: 安装next-auth npm install next-auth 配置pages/_app.js 添加SessionProvider让所有页面均能获取到session数据 import { SessionProvider } from 'next-auth/react' export defaul
阅读全文
posted @ 2021-12-25 16:23 吞天泡泡龙
阅读(6518)
评论(1)
推荐(0)
2021年12月20日
linux安装nodejs
摘要: 下载nodejs包文件 找到需要的包,地址:https://nodejs.org/dist/ 执行命令下载 wget https://nodejs.org/dist/v17.3.0/node-v17.3.0-linux-x64.tar.xz 解压文件 tar xf node-v17.3.0-linu
阅读全文
posted @ 2021-12-20 17:09 吞天泡泡龙
阅读(74)
评论(0)
推荐(0)
2021年12月16日
react17/vue3基础hooks使用对比
摘要: 创建响应式数据 react:useState/useReducer vue:ref/reactive 使用: useState const testState = useState(false) const test = testState[0] const setTest = testState[
阅读全文
posted @ 2021-12-16 16:55 吞天泡泡龙
阅读(581)
评论(0)
推荐(0)
公告