From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 14 六月 2023 09:55:50 +0800
Subject: [PATCH] 2023-06-14

---
 src/templates/zshare/modalform/datatable/index.jsx |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx
index 7f13956..75a9a67 100644
--- a/src/templates/zshare/modalform/datatable/index.jsx
+++ b/src/templates/zshare/modalform/datatable/index.jsx
@@ -431,6 +431,8 @@
   }
 
   render() {
+    const { display, fields } = this.props
+
     const components = {
       body: {
         row: DragableBodyRow,
@@ -456,9 +458,9 @@
     })
 
     let addable = false
-    if (this.props.display === 'picture' || this.props.display === 'color') {
+    if (display === 'picture' || display === 'color') {
       addable = true
-    } else if (this.props.fields && this.props.fields.length > 0) {
+    } else if (fields && fields.length > 0) {
       addable = true
     }
 

--
Gitblit v1.8.0