From f0524f158d89a91ac0dfb758405afa302149442a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 30 四月 2024 01:57:40 +0800 Subject: [PATCH] 2024-04-30 --- src/menu/components/share/pasteforms/index.jsx | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/menu/components/share/pasteforms/index.jsx b/src/menu/components/share/pasteforms/index.jsx index ff09638..180304b 100644 --- a/src/menu/components/share/pasteforms/index.jsx +++ b/src/menu/components/share/pasteforms/index.jsx @@ -10,7 +10,7 @@ const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform')) -class PasteController extends Component { +class PasteForms extends Component { static propTpyes = { config: PropTypes.object, // 缁勪欢閰嶇疆 update: PropTypes.func @@ -26,6 +26,10 @@ const { config } = this.props this.pasteFormRef.handleConfirm().then(res => { + if (res.copyType === 'search' && ['text', 'select', 'multiselect', 'link', 'checkcard', 'date', 'datemonth'].includes(res.type)) { + res.copyType = 'form' + } + if (!['form', 'forms', 'formgroup', 'simpleform'].includes(res.copyType)) { notification.warning({ top: 92, message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�', duration: 5 }) return @@ -34,6 +38,8 @@ if (res.copyType === 'form') { delete res.copyType res = {fields: [res]} + } else if (res.copyType === 'simpleform') { + res = {fields: res.subcards[0].fields} } res.fields = res.fields || [] @@ -171,4 +177,4 @@ } } -export default PasteController \ No newline at end of file +export default PasteForms \ No newline at end of file -- Gitblit v1.8.0