遇到问题
需要对动态生成的数值进行格式化处理,需要格式化数值为2位小数点
相关代码
待修改的数据
{
"code": 200,
"message": "成功",
"data": [
{
"dateTime": "2023-03-29 00:05:00",
"3304810001#sectionAreaValue": 68.072,
"total": 288,
"3304810001#flowValue": 76.308,
"3304810001#waterValue": 1.174,
"3304810001#velocityValue": 0.121
},
{
"dateTime": "2023-03-29 00:10:00",
"3304810001#sectionAreaValue": 67.746,
"total": 288,
"3304810001#flowValue": 75.876,
"3304810001#waterValue": 1.16,
"3304810001#velocityValue": 0.12
},
{
"dateTime": "2023-03-29 00:15:00",
"3304810001#sectionAreaValue": 68.072,
"total": 288,
"3304810001#flowValue": 76.512,
"3304810001#waterValue": 1.17,
"3304810001#velocityValue": 0.124
}
],
"success": true,
"timestamp": 1680091972371,
"traceId": "12393904349099328"
}
我的初步解答思路
目前没有好的思路,求指点
软件环境
vue2、element ui