标签:fixed ret number filters pre module ams port Fix
/*wxs*/
var filters = {
toFix:function(value,count){
var num = Number(value)
return num.toFixed(count)
}
}
module.exports = {
toFix: filters.toFix
}
/*wxml*/
<wxs module="filters" src="路径"></wxs>
<view>{{filters.toFix(item.price,2)}}</view>
标签:fixed ret number filters pre module ams port Fix
原文地址:https://www.cnblogs.com/lemonphp/p/9264420.html