var filters = {
  toFix: function (value) {
    var v = parseFloat(value)//强转,毕竟有可能返回是String类型的数字
    return v.toFixed(2)
  }
}
module.exports = {
  toFix: filters.toFix
}
<!-- 引入wxs文件 -->
<wxs module="filters" src="module.wxs"></wxs>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2021-07-31
  • 2021-07-21
  • 2021-07-24
  • 2021-09-05
相关资源
相似解决方案