From 4fc1eb4913f3302679d88ec01099fc8dd3a80f81 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 08 三月 2023 23:27:21 +0800 Subject: [PATCH] 2023-03-08 --- src/tabviews/custom/components/table/edit-table/index.jsx | 21 ++------------------- 1 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index a988a29..3496def 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 => { @@ -115,17 +109,6 @@ return !cell.Hide }) - } - - 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 } _columns.push(column) @@ -186,7 +169,7 @@ selectedData: [], total: 0 }) - reset && MKEmitter.emit('resetTable', config.uuid, repage) // 鍒楄〃閲嶇疆 + reset && MKEmitter.emit('resetTable', config.uuid, 'true') // 鍒楄〃閲嶇疆 return } @@ -574,7 +557,7 @@ UNSAFE_componentWillReceiveProps(nextProps) { const { config } = this.state - if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { + if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { this.setState({pageIndex: 1}, () => { this.reloadtable() }) -- Gitblit v1.8.0