From 4cc738e535d1a20701d206e12cf9de8cc5a01170 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 01 六月 2024 15:24:12 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/templates/zshare/modalform/index.jsx |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 17b3585..7b515e6 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -51,7 +51,7 @@
 class MainSearch extends Component {
   static propTpyes = {
     formlist: PropTypes.any,
-    standardform: PropTypes.any,
+    fields: PropTypes.array,
     card: PropTypes.object,
     inputSubmit: PropTypes.any
   }
@@ -537,18 +537,21 @@
   changeVal = (val, type) => {
     if (type !== 'span' || ![24, 12, 8, 6].includes(val)) return
 
-    const { standardform } = this.props
+    const { card, fields } = this.props
 
-    if (!standardform || ![24, 12, 8, 6].includes(standardform.span) || !standardform.labelwidth) return
+    let index = fields.findIndex(item => card.uuid === item.uuid)
+    let stform = fields[index - 1]
+    
+    if (!stform || ![24, 12, 8, 6].includes(stform.span) || !stform.labelwidth) return
 
     let labelwidth = null
 
-    if (standardform.span === val) {
-      labelwidth = standardform.labelwidth
-    } else if (standardform.span > val) {
+    if (stform.span === val) {
+      labelwidth = stform.labelwidth
+    } else if (stform.span > val) {
       labelwidth = 33.3
     } else {
-      switch(standardform.span) {
+      switch(stform.span) {
         case 12:
           labelwidth = 16.2
           break;
@@ -930,8 +933,8 @@
     }
   }
 
-  handleConfirm = (fields) => {
-    const { card } = this.props
+  handleConfirm = () => {
+    const { card, fields } = this.props
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     return new Promise((resolve, reject) => {
       this.props.form.validateFieldsAndScroll((err, values) => {

--
Gitblit v1.8.0