摘要: https://github.com/CJY0208/react-activation/blob/master/README_CN.md import { AliveScope } from 'react-activation'; <AliveScope> <Router /> </AliveSco 阅读全文
posted @ 2024-01-29 16:51 起风了1573 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 第一种解决办法 npm config set strict-ssl false 第二种解决办法 换http连接,https连接由于证书的问题会报错 阅读全文
posted @ 2024-01-24 15:01 起风了1573 阅读(92) 评论(0) 推荐(0) 编辑
摘要: const precisionFormatEther = (value, prec = 4) => { if (!value || !Number.isInteger(Number(value)) || Number(value) < 0) return '0' let x, y, z x = fo 阅读全文
posted @ 2023-12-11 11:50 起风了1573 阅读(5) 评论(0) 推荐(0) 编辑
摘要: str.replace(/(\.\d{4})\d+$/, "$1") 阅读全文
posted @ 2023-12-08 11:12 起风了1573 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1 npx serve 2 brew install mkcert 3 新建目录,存放证书,在新目录执行,mkcert 192.168.31.66 (本机ip) 4 pwd 查看当前目录 5 在项目执行 npx serve --ssl-cert /Users/da/Desktop/dyl/doc/s 阅读全文
posted @ 2023-10-23 19:29 起风了1573 阅读(34) 评论(0) 推荐(0) 编辑
摘要: onChange={(value: any) => { let val = Number(value); if (val < 1) { value = ''; setDeviceNumber(''); } else { setDeviceNumber(Number(value.replace(/[^ 阅读全文
posted @ 2023-10-11 11:57 起风了1573 阅读(711) 评论(0) 推荐(0) 编辑
摘要: tsconfig.json中 { "include": ["*/*.ts"] //需要检索的文件位置} 阅读全文
posted @ 2023-07-12 17:07 起风了1573 阅读(209) 评论(0) 推荐(0) 编辑
摘要: export function toFixedReg(value, count) { // 小括号内是我们想要的结果 const reg = new RegExp(`(\\d+\\.?\\d{0,${count}})[\\.\\d]*`); return (value + '.' + '0'.rep 阅读全文
posted @ 2023-05-24 11:32 起风了1573 阅读(9) 评论(0) 推荐(0) 编辑
摘要: export function fmtWalletAddress(str) { if (str == '' || str == undefined || str == "undefined") return str return str.replace(/^(.{6})(?:\w+)(.{4})$/ 阅读全文
posted @ 2023-05-24 11:31 起风了1573 阅读(9) 评论(0) 推荐(0) 编辑
摘要: let b = utils.formatUnits(item[0].toString(), 9); let str1 = ""; let str2 = ""; // 处理有小数点的情况 if (String(b).indexOf(".") > -1) { console.log("是小数"); // 阅读全文
posted @ 2023-05-12 16:14 起风了1573 阅读(48) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示