点我去Gitee
点我去Gitee
摘要: 原链接:https://www.jianshu.com/p/23927bf4b634 在做视频上传时,发现有的视频上传之后无法播放的问题,在手机(ios)上却可以显示 一、先从video标签讲起 在2000年代初期到后期,网络上的视频播放主要依靠Flash插件,这是因为当时没有其它方法可以在浏览器上 阅读全文
posted @ 2023-10-30 16:34 biuo 阅读(1411) 评论(0) 推荐(0) 编辑
摘要: 使复杂异步方法变为同步 假如有一个function async Father(){await A();await b()}, 需要等方法A执行完,再继续往下执行B的代码,而A()中有很多东西,可能会导致异步。 则 可在A()内写成promise(resolve()),在A()内所有方法执行完毕后,再 阅读全文
posted @ 2023-05-17 09:18 biuo 阅读(55) 评论(0) 推荐(0) 编辑
摘要: ReactHook父组件调用子组件的方法,且子组件用了connect 子组件 1、引入useImperativeHandle, forwardRef 2、子组件由function改成let,接收prop和ref,并从props中结构出refInstance 3、用useImperativeHandl 阅读全文
posted @ 2022-12-02 15:41 biuo 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 1、async await 与 promise promise方法被使用时,加上await async 会被异步使用 async使得方法看起来像异步 await promise方法使得方法证证异步 2、newPromise使得方法直接变为异步 外部方式使用此方法时可用try await等待此方法的r 阅读全文
posted @ 2022-11-10 12:09 biuo 阅读(22) 评论(0) 推荐(0) 编辑
摘要: function removeDuplicate(arr) { let len = arr.length for (let i = 0; i < len; i++) { for (let j = i + 1; j < len; j++) { if (arr[i] arr[j]) { arr.spli 阅读全文
posted @ 2022-08-09 14:17 biuo 阅读(34) 评论(0) 推荐(0) 编辑
摘要: mqtt.js import * as mqtt from "mqtt" const options = {//mqtt参数 clean: true, connectTimeout: 4000, clientId: "mqtt" + Math.random().toString(16).substr 阅读全文
posted @ 2022-06-01 11:30 biuo 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 一、websocket // const ws = new WebSocket(`ws://${SourceIP}:11523/ws/robot`); const ws = new WebSocket(`ws://xxx.xxx:xxxx/ws`); ws.addEventListener('mes 阅读全文
posted @ 2022-05-14 15:40 biuo 阅读(245) 评论(0) 推荐(0) 编辑
摘要: //安装browserify ,我这里是全局安装 npm install -g browserify // 编译 browserify ./source/module.js -o ./dist/dist.js 即可在dist目录下看到打包后的dist.js文件。 browserify 后面的第一个参 阅读全文
posted @ 2022-05-14 11:38 biuo 阅读(301) 评论(0) 推荐(0) 编辑
摘要: { "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.includeLanguages": { "javascript": "javascriptreact" }, "editor.tabSize": 2, "edi 阅读全文
posted @ 2022-05-06 19:05 biuo 阅读(42) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/tearer/archive/2010/09/06/1819471.html 阅读全文
posted @ 2022-05-06 15:14 biuo 阅读(50) 评论(0) 推荐(0) 编辑