From 81e1787aaee9d03da52ab8938d1961c4333ee5b5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 02 三月 2023 11:27:51 +0800
Subject: [PATCH] 2023-03-02

---
 src/tabviews/custom/components/form/step-form/index.jsx |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx
index 4fdc3f0..f3711b3 100644
--- a/src/tabviews/custom/components/form/step-form/index.jsx
+++ b/src/tabviews/custom/components/form/step-form/index.jsx
@@ -104,6 +104,16 @@
       _group = _groups || _group
     }
 
+    config.titleStyle = {}
+    config.sortStyle = {}
+
+    if (config.style.fontSize) {
+      let size = parseInt(config.style.fontSize)
+      config.titleStyle = {fontSize: size}
+      let s = size * 1.5 + 'px'
+      config.sortStyle = {width: s, height: s, lineHeight: s, borderRadius: s}
+    }
+
     this.setState({
       sync: _sync,
       data: _data,
@@ -380,7 +390,7 @@
   render() {
     const { config, loading, BID, BData, data, group, dict, step } = this.state
 
-    if (config.setting.supModule && !BID) return null
+    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
     
     return (
       <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
@@ -392,8 +402,8 @@
         }
         {config.wrap.groupLabel !== 'hidden' ? <div className="mk-normal-form-title">
           {config.subcards.map(card => (
-            <div key={card.uuid} className={'form-title' + (card.sort <= step ? ' active' : '')}>
-              <span className="form-sort" style={{background: config.wrap.color}}>{card.sort}</span>
+            <div key={card.uuid} style={config.titleStyle} className={'form-title' + (card.sort <= step ? ' active' : '')}>
+              <span className="form-sort" style={{background: config.wrap.color, ...config.sortStyle}}>{card.sort}</span>
               <span className="before-line" style={{background: config.wrap.color}}></span>
               <span className="after-line" style={{background: config.wrap.color}}></span>
               {card.setting.title}
@@ -406,6 +416,7 @@
           dict={dict}
           data={data}
           action={group}
+          unload={config.setting.supModule && !BID}
           inputSubmit={() => this.mkFormSubmit(group.uuid)}
           wrappedComponentRef={(inst) => this.formRef = inst}
         /> : null}

--
Gitblit v1.8.0