From a8d8d2fdb83f21e76f90cb13ea91ad6e9bf98a9b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 三月 2025 10:53:52 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 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