From 6781ba45775af16872ac68f7e459b1072b16c4cc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 18 十月 2023 17:33:47 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/share/pastecomponent/index.jsx |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx
index 5c2b417..d809808 100644
--- a/src/menu/components/share/pastecomponent/index.jsx
+++ b/src/menu/components/share/pastecomponent/index.jsx
@@ -170,11 +170,23 @@
 
         let keys = config.cols.map(col => (col.field || '$empty'))
 
+        let cols = []
         res.cols.forEach(col => {
-          if (!keys.includes(col.field)) {
-            config.cols.push(col)
+          if (!col.field || !keys.includes(col.field)) {
+            cols.push(col)
           }
         })
+
+        if (cols.length === 0) {
+          notification.warning({
+            top: 92,
+            message: '鏄剧ず鍒楀凡瀛樺湪锛�',
+            duration: 5
+          })
+          return
+        } else {
+          config.cols.push(...cols)
+        }
       }
 
       this.props.updateConfig(config, type)

--
Gitblit v1.8.0