From 6f2b0cab4c9a4dacfebb2d6fbd4ec2fdc14e22ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 29 四月 2024 15:29:58 +0800 Subject: [PATCH] 2024-04-29 --- src/menu/components/table/normal-table/index.jsx | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx index 5a6fd01..9286025 100644 --- a/src/menu/components/table/normal-table/index.jsx +++ b/src/menu/components/table/normal-table/index.jsx @@ -278,11 +278,11 @@ } getWrapForms = () => { - const { wrap, action, columns, cols } = this.state.card + const { card } = this.state - let _actions = [...action] + let _actions = [] - cols.forEach(col => { + card.cols.forEach(col => { if (col.type === 'custom') { col.elements.forEach(cell => { if (cell.eleType !== 'button') return @@ -292,7 +292,7 @@ } }) - return getWrapForm(wrap, _actions, columns) + return getWrapForm(card.wrap, _actions, card.columns, card.action, card.supNodes || [], card.uuid) } updateWrap = (res) => { @@ -311,7 +311,21 @@ res.borderRadius = card.wrap.borderRadius || 0 res.resetContrl = card.wrap.resetContrl || 'init' - this.updateComponent({...card, wrap: res}) + let _card = {...card, wrap: res} + + if (res.supNodes) { + _card.supNodes = res.supNodes + _card.supNodes = _card.supNodes.map(item => { + item.componentId = item.nodes[item.nodes.length - 1] + return item + }) + + delete res.supNodes + } else { + delete _card.supNodes + } + + this.updateComponent(_card) } updatecolumn = (config) => { @@ -374,7 +388,7 @@ <PlusOutlined className="plus" title="娣诲姞鍒�" onClick={() => this.addColumns()}/> {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton}/> - <NormalForm title="琛ㄦ牸璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <NormalForm title="琛ㄦ牸璁剧疆" width={850} update={this.updateWrap} getForms={this.getWrapForms}> <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="normaltable" card={card}/> -- Gitblit v1.8.0