fix(BasicComponents): 修复资金格式化函数处理字符串输入的问题

将formatFundsRmb函数修改为接受字符串输入并转换为数值,确保金额计算正确
This commit is contained in:
砂糖
2025-11-12 16:09:32 +08:00
parent dd9e02d388
commit b5c3c34b81

View File

@@ -153,7 +153,8 @@ export default {
}
return (index % 3) + 1
},
formatFundsRmb (amount) {
formatFundsRmb (str) {
const amount = Number(str) / 10000;
if (amount === undefined || amount === null) return '未知'
if (amount < 10) return '0w-10w'
else if (amount < 20) return '10w-20w'