From 1963b0ec9aaf1cea0580cbacda886fd185d3170c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 七月 2022 14:53:57 +0800
Subject: [PATCH] 2022-07-21

---
 src/tabviews/zshare/topSearch/index.jsx |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index 049729e..43ad250 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -63,6 +63,8 @@
       _setting.placement = setting.drawerPlacement || 'right'
       _setting.ratio = setting.searchRatio || 6
       _setting.labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3
+      _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
+      _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
       _setting.style = null
     } else if (config) {
       if (config.wrap) {
@@ -72,12 +74,16 @@
         _setting.placement = config.wrap.drawerPlacement || 'right'
         _setting.ratio = config.wrap.searchRatio || 6
         _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3
-        _setting.style = null
+        _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
+        _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
       }
+      _setting.style = null
       
       if (config.type === 'search') {
         _setting.float = config.wrap.float || 'left'
         _setting.style = config.style
+      } else if (config.type === 'table' && (config.subtype === 'normaltable' || config.subtype === 'editable')) {
+        _setting.float = 'left'
       } else {
         _setting.float = 'right'
         _setting.show = false
@@ -85,17 +91,14 @@
       }
     }
 
-    _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
-    _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
-
-    if (_setting.advanceType === 'drawer') {
+    if (_setting.advanceType === 'drawer' && _setting.advWidth) {
       if (_setting.placement === 'top' || _setting.placement === 'bottom') {
         _setting.advHeight = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vh'
         _setting.advWidth = '100vw'
       } else {
         _setting.advWidth = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vw'
       }
-    } else if (_setting.advanceType === 'modal') {
+    } else if (_setting.advanceType === 'modal' && _setting.advWidth) {
       if (_setting.advWidth < 100) {
         _setting.advWidth = _setting.advWidth + 'vw'
       } else {
@@ -524,7 +527,7 @@
 
     if (setting.show || setting.showAdv) {
       fields.push(
-        <Col span={setting.searchRatio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions">
+        <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions">
           <Form.Item
             label={' '}
             colon={false}

--
Gitblit v1.8.0