From e9e8b1c7b481415714fff9a0d83099fd5a7d6ff0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 五月 2023 17:25:11 +0800 Subject: [PATCH] 2023-05-18 --- src/tabviews/custom/components/share/normalTable/index.jsx | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 33d8d9b..4922254 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -340,7 +340,16 @@ // eslint-disable-next-line content = eval(content) } catch (e) { + if (window.debugger) { + console.info(content) + console.warn(e) + } content = '' + } + + if (col.round && typeof(content) === 'number') { + content = Math.round(content * col.round) / col.round + content = content.toFixed(col.decimal) } } @@ -375,14 +384,6 @@ style = {...style, ...col.style} } - resProps.children = ( - <CardCellComponent data={record} cards={config} elements={col.elements}/> - ) - } else if (col.type === 'action') { - style.padding = '0px' - if (col.style) { - style = {...style, ...col.style} - } resProps.children = ( <CardCellComponent data={record} cards={config} elements={col.elements}/> ) @@ -477,7 +478,7 @@ onCell: record => ({ record, col: item, - config: item.type === 'custom' || item.type === 'action' ? {setting, columns: fields} : null, + config: item.type === 'custom' ? {setting, columns: fields} : null, triggerLink: this.triggerLink }) } -- Gitblit v1.8.0