做项目的时候发现,vue获取input的输入数据有误差 比如输入19.9,传值时变成19.89 解决方案:使用parseFloat、toFixed解决 a 需要处理的数据 parseFloat((a* 100).toFixed(10))