From aaa64a8ccf6c058ddcc555588c782d8f5e588e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=A9=E8=BE=95Rowboat?= Date: Tue, 20 Jun 2017 14:53:07 +0800 Subject: [PATCH] update format code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 没用编辑器,所以代码没格式化/(ㄒoㄒ)/~~ --- src/filters/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filters/index.js b/src/filters/index.js index 4943cde8..9524edcc 100644 --- a/src/filters/index.js +++ b/src/filters/index.js @@ -105,7 +105,7 @@ export function html2Text(val) { export function toThousandslsFilter(num) { return (+num || 0).toString() - .replace(/^\-?\d+/g, function(m){ - return m.replace(/(?=(?!\b)(\d{3})+$)/g, ','); - }); + .replace(/^\-?\d+/g, function (m) { + return m.replace(/(?=(?!\b)(\d{3})+$)/g, ','); + }); }