From f3ec8c20eeabee6eaab1508d2f3896c28aab611c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 22 七月 2021 14:42:42 +0800 Subject: [PATCH] 修改页面中按钮保存 --- src/menu/components/table/normal-table/columns/index.jsx | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index 338f763..c88a996 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -179,6 +179,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + appType: sessionStorage.getItem('appType'), tableId: '', data: [{uuid: Utils.getuuid()}], refresh: false, // 寮哄埗鍒锋柊 @@ -383,22 +384,29 @@ } deleteCol = (col) => { + const { appType } = this.state let _columns = fromJS(this.state.columns).toJS() - _columns = this.loopDelCol(_columns, col) - if (col.type === 'action') { - let uuids = [] - col.elements && col.elements.forEach(c => { - uuids.push(c.uuid) - }) - MKEmitter.emit('delButtons', uuids) - } + _columns = this.loopDelCol(_columns, col) this.setState({ columns: _columns }, () => { 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