From 6ae85d25c2e5773a07fdaf3ad477fbdbb61c9165 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 02 六月 2022 16:14:43 +0800
Subject: [PATCH] 2022-06-02

---
 src/menu/components/card/cardcellcomponent/index.jsx |   74 ++++++++++++++++++++----------------
 1 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 675fb0b..f5275c9 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -157,6 +157,8 @@
       }
     } else if (element.eleType === 'picture') {
       options = ['border', 'margin']
+    } else if (element.eleType === 'text') {
+      options[0] = 'font2'
     } else if (element.eleType === 'slider') {
       options = ['padding', 'margin']
     } else if (element.eleType === 'splitline') {
@@ -633,6 +635,44 @@
     })
   }
 
+  getVerify = (card) => {
+    const { cards } = this.props
+    const { dict } = this.state
+
+    if (!card) return null
+
+    if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
+      return <VerifyCard
+        card={card}
+        dict={dict}
+        config={cards}
+        columns={cards.columns}
+        wrappedComponentRef={(inst) => this.verifyRef = inst}
+      />
+    } else if (card.OpenType === 'excelIn') {
+      return <VerifyExcelIn
+        card={card}
+        dict={dict}
+        columns={cards.columns}
+        wrappedComponentRef={(inst) => this.verifyRef = inst}
+      />
+    } else if (card.OpenType === 'excelOut') {
+      return <VerifyExcelOut
+        card={card}
+        dict={dict}
+        config={cards}
+        wrappedComponentRef={(inst) => this.verifyRef = inst}
+      />
+    } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') {
+      return <VerifyPrint
+        card={card}
+        dict={dict}
+        columns={cards.columns}
+        wrappedComponentRef={(inst) => this.verifyRef = inst}
+      />
+    }
+  }
+
   render() {
     const { cards, cardCell } = this.props
     const { elements, visible, actvisible, profVisible, card, dict, record } = this.state
@@ -719,39 +759,7 @@
             }}
             destroyOnClose
           >
-            {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ?
-              <VerifyCard
-                card={card}
-                dict={dict}
-                config={cards}
-                columns={cards.columns}
-                wrappedComponentRef={(inst) => this.verifyRef = inst}
-              /> : null
-            }
-            {card && card.execMode ?
-              <VerifyPrint
-                card={card}
-                dict={dict}
-                columns={cards.columns}
-                wrappedComponentRef={(inst) => this.verifyRef = inst}
-              /> : null
-            }
-            {card && card.OpenType === 'excelIn' ?
-              <VerifyExcelIn
-                card={card}
-                dict={dict}
-                columns={cards.columns}
-                wrappedComponentRef={(inst) => this.verifyRef = inst}
-              /> : null
-            }
-            {card && card.OpenType === 'excelOut' ?
-              <VerifyExcelOut
-                card={card}
-                dict={dict}
-                config={cards}
-                wrappedComponentRef={(inst) => this.verifyRef = inst}
-              /> : null
-            }
+            {this.getVerify(card)}
           </Modal>
         </div>
       </div>

--
Gitblit v1.8.0