From fdce913ce7b9d55c34a2abd7a94ee377a4869b9a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 21 三月 2025 19:57:24 +0800 Subject: [PATCH] 2025-03-21 --- src/menu/components/share/pastecomponent/index.jsx | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx index 90944e9..4bb09c2 100644 --- a/src/menu/components/share/pastecomponent/index.jsx +++ b/src/menu/components/share/pastecomponent/index.jsx @@ -121,9 +121,44 @@ return item } + extra = (res) => { + let config = fromJS(this.props.config).toJS() + + if (res.copyType === 'mk_actions') { + config.action = res.action + this.props.updateConfig(config) + + setTimeout(() => { + MKEmitter.emit('revertBtn', config.uuid) + }, 30) + } else if (res.copyType === 'mk_searches') { + config.search = res.search + this.props.updateConfig(config) + + setTimeout(() => { + MKEmitter.emit('revert', config.uuid, 'search') + }, 30) + } else if (res.copyType === 'mk_fields') { + config.columns = res.columns + this.props.updateConfig(config) + } else if (res.copyType === 'mk_cols') { + config.cols = res.cols + this.props.updateConfig(config) + } else if (res.copyType === 'mk_setting') { + config.setting = res.setting + this.props.updateConfig(config) + } + console.log(config) + this.setState({visible: false}) + } + pasteSubmit = () => { const { options } = this.props this.pasteFormRef.handleConfirm().then(res => { + if (/^mk_/.test(res.copyType)) { // dms-trans + this.extra(res) + return + } if (!options.includes(res.copyType)) { notification.warning({ top: 92, message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�', duration: 5 }) return -- Gitblit v1.8.0