From 4fc1eb4913f3302679d88ec01099fc8dd3a80f81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 08 三月 2023 23:27:21 +0800
Subject: [PATCH] 2023-03-08

---
 src/tabviews/custom/components/form/step-form/index.jsx |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx
index c9c0773..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,
@@ -253,11 +263,7 @@
         param: {$BID: id || ''}
       }
 
-      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
-        MKEmitter.emit('modifyTabs', newtab, 'replace')
-      } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
-      }
+      MKEmitter.emit('modifyTabs', newtab, true)
     }
   }
 
@@ -384,6 +390,8 @@
   render() {
     const { config, loading, BID, BData, data, group, dict, step } = this.state
 
+    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
+    
     return (
       <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
         {loading ?
@@ -394,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}
@@ -408,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