Commit e3f7b5b6 authored by 李晓兵's avatar 李晓兵

'filter'

parent f8968226
......@@ -2,8 +2,8 @@
export default (Vue) => {
Vue.filter('currency', function (val) {
if (!val) return '0.00'
var intPart = Number(val).toFixed(0) // 获取整数部分
// var intPart = Number(val).toFixed(0) // 获取整数部分
var intPart = val.toString().split('.')[0]
var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
var floatPart = '.00' // 预定义小数部分
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment