From af6486b3629d23e426ce85b87dbc20dfa15b1afe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 07 十一月 2022 18:50:27 +0800 Subject: [PATCH] 2022-11-07 --- src/menu/components/table/edit-table/columns/index.jsx | 25 ++++++------------------- 1 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index ccb4fbd..bf073d4 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -181,7 +181,6 @@ } state = { - appType: sessionStorage.getItem('appType'), tableId: '', data: [{uuid: Utils.getuuid()}], refresh: false, // 寮哄埗鍒锋柊 @@ -262,14 +261,12 @@ let _columns = fromJS(this.state.columns).toJS() let type = item.subType - if (item.subType === 'link' || item.subType === 'colspan' || item.subType === 'picture') { + if (!['text', 'number', 'textarea', 'custom', 'action', 'formula', 'index'].includes(item.subType)) { type = 'text' } let col = { focus: true, uuid: Utils.getuuid(), label: 'label', field: '', type: type, elements: [] } - if (col.type === 'colspan') { - col.subcols = [] - } else if (col.type === 'action') { + if (col.type === 'action') { col.label = '鎿嶄綔' } else if (col.type === 'index') { col.label = '搴忓彿' @@ -299,6 +296,10 @@ let config = {...this.props.config, cols: _columns} if (btn) { config.action = config.action.filter(item => item.uuid !== btn.uuid) + + setTimeout(() => { + MKEmitter.emit('revert', config.uuid) + }, 200) } this.props.updatecolumn(config) @@ -402,7 +403,6 @@ } deleteCol = (col) => { - const { appType } = this.state let _columns = fromJS(this.state.columns).toJS() _columns = _columns.filter(column => column.uuid !== col.uuid) @@ -412,19 +412,6 @@ }, () => { this.props.updatecolumn({...this.props.config, cols: _columns}) }) - - if (col.type !== 'action' || appType === 'mob') return - - let uuids = [] - col.elements && col.elements.forEach(c => { - if (appType === 'pc' && c.OpenType !== 'popview') return - - uuids.push(c.uuid) - }) - - if (uuids.length === 0) return - - MKEmitter.emit('delButtons', uuids) } updateLineMarks = (vals) => { -- Gitblit v1.8.0