const sleep = m => new Promise(r => setTimeout(r, m)); await sleep(3000);

Vicw.com用户头像 - XanderCheung XanderCheung 2836 0 0

例如: '2,430,209.12340000' => '2,430,209.1234' 方案: const str = '2,430,209.12340000' str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') 解释: 再解释下正则的意思`(?:\.0*|(\.\d+?)0+)$` `(?:reg1|reg2)` 它是一个正则分组非捕获...

Vicw.com用户头像 - XanderCheung XanderCheung 883 0 0