|
@@ -952,7 +952,8 @@ module.exports = {
|
|
|
return overWan ? getWan(overWan) + '万' + getWan(noWan) : getWan(num);
|
|
|
},
|
|
|
formatNum(num, pattern) {
|
|
|
- const strarr = num ? num.toString().split('.') : ['0'];
|
|
|
+ const minus = num > 0 ? '' : '-'
|
|
|
+ const strarr = num ? Math.abs(num).toString().split('.') : ['0'];
|
|
|
const fmtarr = pattern ? pattern.split('.') : [''];
|
|
|
let retstr = '';
|
|
|
|
|
@@ -1002,7 +1003,7 @@ module.exports = {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- return retstr.replace(/^,+/, '').replace(/\.$/, '');
|
|
|
+ return minus + retstr.replace(/^,+/, '').replace(/\.$/, '');
|
|
|
},
|
|
|
|
|
|
dateTran(time, style = 'YYYY年MM月DD日 HH:mm') {
|