From 9798a9fa338ee5d022793ae1ef91a49e2e2b4c62 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 22 十二月 2019 10:10:28 +0800 Subject: [PATCH] 2019-12-22 --- src/tabviews/commontable/mainTable/index.jsx | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/tabviews/commontable/mainTable/index.jsx b/src/tabviews/commontable/mainTable/index.jsx index 77e02c2..9759c81 100644 --- a/src/tabviews/commontable/mainTable/index.jsx +++ b/src/tabviews/commontable/mainTable/index.jsx @@ -139,7 +139,8 @@ content = +record[col.field] } if (content && col.format === 'thdSeparator') { - + content = `${content}` + content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } content = (col.prefix || '') + content + (col.postfix || '') } @@ -147,12 +148,23 @@ }) } + if (contents && item.order === 'vertical2') { + let _contents = [] + for(let i = 0; i < contents.length; i += 2) { + _contents.push(contents.slice(i, i + 2).join(' ')) + } + contents = _contents + } + return ( <div> <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> {contents && item.order === 'vertical' && contents.map((content, index) => { return (<p key={index}>{content}</p>) })} + {contents && item.order === 'vertical2' && contents.map((content, index) => { + return (<p key={index}>{content}</p>) + })} {contents && item.order === 'horizontal' && contents.map((content, index) => { return (<span key={index}>{content}</span>) })} -- Gitblit v1.8.0