@ -104,5 +104,8 @@ export function html2Text(val) {
export function toThousandslsFilter(num) {
return (+num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
return (+num || 0).toString()
.replace(/^\-?\d+/g, function(m){
return m.replace(/(?=(?!\b)(\d{3})+$)/g, ',');
});
}