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 吞天泡泡龙 阅读(199) 评论(0) 推荐(0) 编辑
  2022年3月4日
摘要: 定义对象 interface UserInterface { name:string, age:number } type UserType = { name: string age: number } 定义函数 interface addInterface { (count:number):num 阅读全文
posted @ 2022-03-04 10:20 吞天泡泡龙 阅读(74) 评论(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 吞天泡泡龙 阅读(233) 评论(2) 推荐(1) 编辑
  2022年2月24日
摘要: 引入threejs script引入 <script src=".../three.min.js"></script> <script src=".../GLTFLoader.js"></script> <script src=".../OrbitControls.js"></script> 安装引 阅读全文
posted @ 2022-02-24 15:24 吞天泡泡龙 阅读(197) 评论(0) 推荐(0) 编辑
  2022年1月11日
摘要: 问题背景 nodejs-expressjs处理post请求 使用apidoc自动生成接口文档 使用apidoc的“发送示例请求”功能测试接口 post接口选择form-data时后端获取不到body数据 原因 apidoc发送示例请求使用的是jquery的ajax,设置了Content-Type = 阅读全文
posted @ 2022-01-11 14:43 吞天泡泡龙 阅读(65) 评论(0) 推荐(0) 编辑
  2021年12月25日
摘要: 安装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 吞天泡泡龙 阅读(5935) 评论(1) 推荐(0) 编辑
  2021年12月20日
摘要: 下载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 吞天泡泡龙 阅读(61) 评论(0) 推荐(0) 编辑
  2021年12月16日
摘要: 创建响应式数据 react:useState/useReducer vue:ref/reactive 使用: useState const testState = useState(false) const test = testState[0] const setTest = testState[ 阅读全文
posted @ 2021-12-16 16:55 吞天泡泡龙 阅读(523) 评论(0) 推荐(0) 编辑