12.4 概念模块功能完善

This commit is contained in:
尚政杰
2025-12-04 17:41:33 +08:00
parent 4e64455b9b
commit 44842120da
5090 changed files with 9843 additions and 146120 deletions

View File

@@ -164,6 +164,28 @@ export function getRateStr(r)
}
}
/**
* 获取涨跌幅字符串
* @param {Object} r
*/
export function getChgRateStr(r)
{
if (!r) return
r = String(r)
if(r.indexOf('-')>-1)
{
r = r.substr(1,r.length-1)
return '-'+parseFloat(r).toFixed(2)
}else
{
if(parseFloat(r)==0)
{
return 0.00
}else
return '+'+parseFloat(r).toFixed(2)
}
}
/**
* 获取涨幅字符串是涨还是跌 true为跌false为涨
* @param {Object} r