From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/tabviews/custom/components/form/step-form/index.jsx |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx
index c5c8315..83349ad 100644
--- a/src/tabviews/custom/components/form/step-form/index.jsx
+++ b/src/tabviews/custom/components/form/step-form/index.jsx
@@ -62,6 +62,7 @@
           _data = _data[0] || {$$empty: true}
         }
         _sync = false
+        _data.$$uuid = _data[config.setting.primaryKey] || ''
       }
     } else {
       _data = {$$empty: true}
@@ -102,6 +103,16 @@
 
       let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
       _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({
@@ -158,6 +169,8 @@
           _data = _data[0] || {$$empty: true}
         }
       }
+
+      _data.$$uuid = _data[config.setting.primaryKey] || ''
 
       if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
         let _status = _data[config.wrap.statusControl]
@@ -294,6 +307,8 @@
       let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true}
       let _group = this.state.group
 
+      _data.$$uuid = _data[config.setting.primaryKey] || ''
+
       if (type === 'refresh') {
         _group = config.subcards[0]
       }
@@ -380,6 +395,9 @@
   render() {
     const { config, loading, BID, BData, data, group, dict, step } = this.state
 
+    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
+    if (config.idCtrl && (!data || data.$$empty)) return null
+    
     return (
       <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
         {loading ?
@@ -390,8 +408,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}

--
Gitblit v1.8.0