From 3723f5e83b1733882a152018450bb5ab18e683b0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 30 三月 2022 22:22:27 +0800
Subject: [PATCH] 2022-03-30

---
 src/tabviews/zshare/topSearch/index.jsx |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index 316dca4..39e88fc 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -101,6 +101,13 @@
         linkFields[item.linkField].push({field: item.field, uuid: item.uuid})
       }
 
+      let labelwidth = item.labelwidth || 33.3
+      if (item.labelShow === 'false') {
+        labelwidth = 0
+      }
+      item.labelCol = {style: {width: labelwidth + '%'}}
+      item.wrapperCol = {style: {width: (100 - labelwidth) + '%'}}
+
       if (fieldMap.has(item.field)) {
         item.field = item.field + '@tail@'
       }
@@ -497,7 +504,12 @@
       if (content) {
         fields.push(
           <Col span={item.ratio || 6} key={index}>
-            <Form.Item className={className} label={item.labelShow !== 'false' ? item.label : ''}>
+            <Form.Item
+              className={className}
+              label={item.labelShow !== 'false' ? item.label : ''}
+              labelCol={item.labelCol}
+              wrapperCol={item.wrapperCol}
+            >
               {getFieldDecorator(field, {
                 initialValue: item.initval,
                 rules: _rules

--
Gitblit v1.8.0