From 81a5ae579e84d7cfe0cda268d4156d4b78a27454 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 30 十二月 2024 13:46:34 +0800 Subject: [PATCH] 2024-12-30 --- src/menu/components/share/pastecomponent/index.jsx | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx index 7f0b88c..f0e89a1 100644 --- a/src/menu/components/share/pastecomponent/index.jsx +++ b/src/menu/components/share/pastecomponent/index.jsx @@ -6,6 +6,7 @@ import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' +import MenuUtils from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' // import './index.scss' @@ -28,7 +29,9 @@ item.uuid = _uuid } - if (item.copyType === 'cardcell' && config.subtype === 'datacard') { + if (item.copyType === 'action') { + MenuUtils.resetBtn(item, _uuid) + } else if (item.copyType === 'cardcell' && config.subtype === 'datacard') { item.setting = item.setting || {} item.$cardType = 'extendCard' item.setting.width = item.setting.width || 6 @@ -39,6 +42,10 @@ cell.datatype = 'static' } cell.uuid = Utils.getuuid() + + if (cell.eleType === 'button') { + MenuUtils.resetBtn(cell, _uuid) + } return cell }) } @@ -48,6 +55,10 @@ cell.datatype = 'static' } cell.uuid = Utils.getuuid() + + if (cell.eleType === 'button') { + MenuUtils.resetBtn(cell, _uuid) + } return cell }) } @@ -64,12 +75,18 @@ if (item.elements) { item.elements = item.elements.map(cell => { cell.uuid = Utils.getuuid() + if (cell.eleType === 'button') { + MenuUtils.resetBtn(cell, _uuid) + } return cell }) } if (item.backElements) { item.backElements = item.backElements.map(cell => { cell.uuid = Utils.getuuid() + if (cell.eleType === 'button') { + MenuUtils.resetBtn(cell, _uuid) + } return cell }) } @@ -87,6 +104,9 @@ } else if (col.type === 'custom' && col.elements) { col.elements = col.elements.map(cell => { cell.uuid = Utils.getuuid() + if (cell.eleType === 'button') { + MenuUtils.resetBtn(cell, _uuid) + } return cell }) } @@ -112,6 +132,10 @@ this.props.updateConfig(res) this.setState({visible: false}) return + } + + if (res.copyType === 'editcols') { + res.copyType = 'cols' } let type = res.copyType @@ -168,7 +192,7 @@ } else if (type === 'cols') { config.cols = config.cols.filter(col => !col.origin) - if (config.subtype === 'normaltable' && res.cols.length === 1) { + if ((config.subtype === 'normaltable' || config.subtype === 'editable') && res.cols.length === 1) { config.cols.push(...res.cols) } else { let keys = config.cols.map(col => (col.field || '$empty')) -- Gitblit v1.8.0