This commit is contained in:
parent
d3f48625c8
commit
be8db89a18
|
@ -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})?/));
|
||||||
|
|
Loading…
Reference in New Issue