摘要:
https://github.com/CJY0208/react-activation/blob/master/README_CN.md import { AliveScope } from 'react-activation'; <AliveScope> <Router /> </AliveSco 阅读全文
摘要:
第一种解决办法 npm config set strict-ssl false 第二种解决办法 换http连接,https连接由于证书的问题会报错 阅读全文
摘要:
const precisionFormatEther = (value, prec = 4) => { if (!value || !Number.isInteger(Number(value)) || Number(value) < 0) return '0' let x, y, z x = fo 阅读全文
摘要:
str.replace(/(\.\d{4})\d+$/, "$1") 阅读全文
摘要:
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 阅读全文
摘要:
onChange={(value: any) => { let val = Number(value); if (val < 1) { value = ''; setDeviceNumber(''); } else { setDeviceNumber(Number(value.replace(/[^ 阅读全文
摘要:
tsconfig.json中 { "include": ["*/*.ts"] //需要检索的文件位置} 阅读全文
摘要:
export function toFixedReg(value, count) { // 小括号内是我们想要的结果 const reg = new RegExp(`(\\d+\\.?\\d{0,${count}})[\\.\\d]*`); return (value + '.' + '0'.rep 阅读全文
摘要:
export function fmtWalletAddress(str) { if (str == '' || str == undefined || str == "undefined") return str return str.replace(/^(.{6})(?:\w+)(.{4})$/ 阅读全文
摘要:
let b = utils.formatUnits(item[0].toString(), 9); let str1 = ""; let str2 = ""; // 处理有小数点的情况 if (String(b).indexOf(".") > -1) { console.log("是小数"); // 阅读全文