From 8137ac074ce6370e4b46295e7acf9c7870ef82d2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 二月 2023 22:19:23 +0800 Subject: [PATCH] 2023-02-17 --- src/tabviews/custom/components/table/edit-table/index.jsx | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 49dae01..c8c762b 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -48,7 +48,6 @@ */ UNSAFE_componentWillMount () { let _config = fromJS(this.props.config).toJS() - let _cols = new Map() let setting = {..._config.setting, ..._config.wrap} setting.tableId = Utils.getuuid() @@ -82,11 +81,6 @@ setting.operType = 'btnMode' } - _config.columns.forEach(item => { - if (item.type !== 'number') return - _cols.set(item.field, item) - }) - let _columns = [] let signAdd = false _config.cols.forEach(column => { @@ -117,14 +111,7 @@ }) } - if (column.type === 'custom') { - column.elements = column.elements.map(item => { - if (item.eleType === 'number' && item.field && _cols.has(item.field) && typeof(item.decimal) !== 'number') { - item.decimal = _cols.get(item.field).decimal || 0 - } - return item - }) - } else if (column.type === 'action') { + if (column.type === 'action') { column.operations = column.elements } -- Gitblit v1.8.0