摘要: 原理:通过同步更新 useRef 来获取最新值 // util.ts export const useRefState = (init: any = null) => { const [state, setState] = useState(init); const stateRef = useRe 阅读全文
posted @ 2024-07-03 14:08 SKILL·NULL 阅读(4) 评论(0) 推荐(0) 编辑
摘要: // 处理报错 ResizeObserver loop completed with undelivered notifications. export const handlerResizeObserverError = () => { const debounce = (callback: (. 阅读全文
posted @ 2024-04-26 09:35 SKILL·NULL 阅读(353) 评论(0) 推荐(0) 编辑
摘要: Sublime Text下载地址:Download - Sublime Text 破解工具“Hex Fiend”下载地址:Hex Fiend, a fast and clever hex editor for macOS 打开Hex Fiend -> File -> Open File 在Appli 阅读全文
posted @ 2023-08-24 11:52 SKILL·NULL 阅读(4401) 评论(4) 推荐(0) 编辑
摘要: 移动端分页列表,在ios上滚动加载分页时候,使用scrollTop,会引起白屏问题。 看不少文章说是使用了-webkit-overflow-scrolling: touch;引起的硬件加速问题。亲测删除问题仍然存在。 this.$nextTick(() => { window.scrollTo(0, 阅读全文
posted @ 2023-07-12 11:18 SKILL·NULL 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 使用 npm config set force false 可以消除。 阅读全文
posted @ 2023-07-04 09:45 SKILL·NULL 阅读(3095) 评论(0) 推荐(0) 编辑
摘要: ios11不支持正则零宽断言,以字符串 $哈哈哈(sh039488)$ 为例: 不兼容写法:/\$(?<=\$).*?(?=\)\$)\)\$/g 兼容写法:/\$(.*?)\)\$/g 阅读全文
posted @ 2023-06-28 16:09 SKILL·NULL 阅读(34) 评论(0) 推荐(0) 编辑
摘要: let res = "$你好你好$" res = res.replace(/\$(?<=\$).*?(?=\$)\$/g, `<span onclick="((params)=>{ console.log(params) })('$&')" style="color: dodgerblue;padd 阅读全文
posted @ 2023-06-27 13:15 SKILL·NULL 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Remove-Item -Recurse -Force <要删除的目录> 可以简写为: rm -r -fo <要删除目录> 阅读全文
posted @ 2023-03-14 10:27 SKILL·NULL 阅读(720) 评论(0) 推荐(0) 编辑
摘要: brew install hudochenkov/sshpass/sshpass sshpass -p password ssh -p port user@xxxx.xxxx.xxxx.xxxx 阅读全文
posted @ 2023-02-28 11:01 SKILL·NULL 阅读(18) 评论(0) 推荐(0) 编辑
摘要: # 定义sedi数组 # Linux sed后面, 用 "-i" sedi=(-i) case "$(uname)" in Darwin*) # Mac sed后面, -i 后面多个空字符串 "" sedi=(-i "") esac 例:删除 device.js 包含 “export default 阅读全文
posted @ 2022-08-12 11:51 SKILL·NULL 阅读(121) 评论(0) 推荐(0) 编辑