From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 11 三月 2023 17:58:54 +0800 Subject: [PATCH] 2023-03-11 --- src/tabviews/custom/components/table/normal-table/index.jsx | 28 +--------------------------- 1 files changed, 1 insertions(+), 27 deletions(-) diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 0ffafaa..b4ec245 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -54,7 +54,6 @@ UNSAFE_componentWillMount () { const { data, initdata } = this.props let _config = fromJS(this.props.config).toJS() - let _cols = new Map() let _data = null let _sync = _config.setting.sync === 'true' @@ -130,31 +129,6 @@ } } } - - _config.columns.forEach(item => { - if (item.type !== 'number') return - _cols.set(item.field, item) - }) - - _config.cols.forEach(column => { - 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') { - column.operations = column.elements - } - }) - - // if (setting.color) { - // setting.style.color = setting.color - // } - // if (setting.fontSize) { - // setting.style.fontSize = setting.fontSize - // } if (_config.wrap.collapse === 'true') { _config.wrap.title = _config.wrap.title || ' ' @@ -240,7 +214,7 @@ let result = await Api.genericInterface(param) if (result.status) { this.loaded = true - if (config.$cache && pageIndex === 1) { + if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') { Api.writeCacheConfig(config.uuid, result.data || '') } -- Gitblit v1.8.0