摘要:
配件: 太阳能充电板*1、充电模块*1、18650电池*1、10kΩ*3、NPN三极管(S8050)*1、光敏电阻*1、发光二极管*1、导线若干 电路图: 实物模拟图: 为电路添加充电模块: 原理: 阅读全文
摘要:
先看下兼容性: 可以看到 @supports 兼容性很好,所以使用 @supports 做兼容是个不错的选择。 例: @supports (padding-bottom: env(safe-area-inset-bottom)) or (padding-bottom: constant(safe-a 阅读全文
摘要:
&::after { content: ""; position: absolute; top: -50%; bottom: -50%; left: -50%; right: -50%; border: 1px solid #e9e9e9; border-radius: 2px; -webkit-t 阅读全文
摘要:
首先,在拖动 div 时,判断当前容器 div 是否有滚动条,如果没有,则禁止整个 div 拖动,例: const list_dom: any = document.querySelector(".list"); list_dom.addEventListener("touchmove",(ev) 阅读全文
摘要:
history.pushState(null, null, document.URL) window.addEventListener('popstate',() => { history.pushState(null, null, document.URL) // TODO somthing }, 阅读全文
摘要:
升级包下载: https://pan.baidu.com/s/1TLG7m9BjUGPw4wMAoPYSdw?pwd=w4ih 提取码: w4ih 网页升级方法: 提醒:升级有风险,设备升级过程中请勿断电!设备固件升级后可能会出现参数恢复默认的情况。 操作步骤步骤一:.固件程序下载:电脑浏览器打开链 阅读全文
摘要:
官网提供的按需引入方法为全量按需引入,在打包分离中,仍旧存在使用不到的图表被打包进去。 例如:组件A使用了折线图、柱状图,组件B只用到了折线图,但是打包组件B的时候,柱状图也会被打包进去。 本文提供一种动态按需引入的思路,使得只用到折线图的组件B,打包的时候只打包折线图,不会将组件A用到的柱状图也打 阅读全文
摘要:
原理:通过同步更新 useRef 来获取最新值 // util.ts export const useRefState = (init: any = null) => { const [state, setState] = useState(init); const stateRef = useRe 阅读全文
摘要:
// 处理报错 ResizeObserver loop completed with undelivered notifications. export const handlerResizeObserverError = () => { const debounce = (callback: (. 阅读全文
摘要:
Sublime Text下载地址:Download - Sublime Text 破解工具“Hex Fiend”下载地址:Hex Fiend, a fast and clever hex editor for macOS 打开Hex Fiend -> File -> Open File 在Appli 阅读全文