From 50b49c1b760489c3430fc382656d57c5fbbab07c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 16:07:24 +0800
Subject: [PATCH] 2024-04-29

---
 src/templates/sharecomponent/searchcomponent/index.jsx |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx
index 9d4b8f3..ab95ce6 100644
--- a/src/templates/sharecomponent/searchcomponent/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/index.jsx
@@ -93,6 +93,7 @@
    * @description 鎼滅储鏉′欢缂栬緫锛岃幏鍙栨悳绱㈡潯浠惰〃鍗曚俊鎭�
    */
   handleSearch = (card) => {
+    const { config } = this.props
     const { searchlist } = this.state
     let linkableFields = []
 
@@ -108,8 +109,8 @@
     })
 
     let columns = null
-    if (this.props.config.type === 'table') {
-      columns = this.props.config.columns.map(item => {
+    if (config.columns && config.columns.length) {
+      columns = config.columns.map(item => {
         return {key: item.uuid, text: item.field, value: item.field, label: item.label}
       })
     }

--
Gitblit v1.8.0