This commit is contained in:
zzy 2023-05-04 10:24:45 +08:00
parent d3f48625c8
commit be8db89a18
1 changed files with 4 additions and 1 deletions

View File

@ -452,7 +452,9 @@ function setOfferings(mockRes: any) {
}) })
} }
const { shares: number, value: persent } = element; const { shares: number, value: persent } = element;
return { number:formatNumber(number) , persent:formatNumber(persent?.toFixed(2)) } // console.log('ttttttttttttttttttt',persent);
let per=Number(persent)
return { number:formatNumber(number) , persent:per&&formatNumber(per.toFixed(2)) }
} else { } else {
const { threshold: number, allocation: persent } = element; const { threshold: number, allocation: persent } = element;
@ -464,6 +466,7 @@ function setOfferings(mockRes: any) {
return filterObj return filterObj
}) })
} }
//
const keepTwoDecimalStr = (num: number) => { const keepTwoDecimalStr = (num: number) => {
if (num) { if (num) {
const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/)); const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));