From 9be28daa8b377b054127fd78254dfa63d29e3a7b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 六月 2024 15:08:13 +0800
Subject: [PATCH] 2024-06-06

---
 src/menu/components/card/double-data-card/options.jsx                 |    4 +-
 src/menu/components/table/edit-table/options.jsx                      |    6 +-
 src/menu/components/table/normal-table/options.jsx                    |    6 +-
 src/tabviews/custom/components/share/normalTable/index.jsx            |   10 ++++-
 src/menu/components/card/data-card/options.jsx                        |    4 +-
 src/menu/components/table/base-table/options.jsx                      |    6 +-
 src/tabviews/custom/components/card/double-data-card/index.jsx        |    8 +++
 src/tabviews/custom/components/card/data-card/index.jsx               |    9 ++++
 src/assets/css/main.scss                                              |    1 
 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx |   10 ++++-
 10 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss
index 95cb867..6dc0b43 100644
--- a/src/assets/css/main.scss
+++ b/src/assets/css/main.scss
@@ -743,6 +743,7 @@
     background: #fafafa;
   }
   .ant-table-body {
+    min-height: 50px;
     border-bottom: 1px solid rgba(0, 0, 0, .05);
     .ant-table-fixed {
       border-bottom: 0;
diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index e532cdc..ef3ad49 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -218,8 +218,8 @@
       field: 'zHeight',
       label: '鏈�澶ч珮搴�',
       initval: wrap.zHeight || '',
-      tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�',
-      min: 10,
+      tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
       max: 3000,
       precision: 0,
       required: false,
diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx
index 0dcc88d..df705e7 100644
--- a/src/menu/components/card/double-data-card/options.jsx
+++ b/src/menu/components/card/double-data-card/options.jsx
@@ -65,8 +65,8 @@
       field: 'zHeight',
       label: '鏈�澶ч珮搴�',
       initval: wrap.zHeight || '',
-      tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�',
-      min: 10,
+      tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
       max: 3000,
       precision: 0,
       required: false,
diff --git a/src/menu/components/table/base-table/options.jsx b/src/menu/components/table/base-table/options.jsx
index f81f5be..22d06e6 100644
--- a/src/menu/components/table/base-table/options.jsx
+++ b/src/menu/components/table/base-table/options.jsx
@@ -163,10 +163,10 @@
     {
       type: 'number',
       field: 'height',
-      label: '琛ㄦ牸楂樺害',
+      label: '鏈�澶ч珮搴�',
       initval: wrap.height || '',
-      tooltip: '琛ㄦ牸鍐呭鍖虹殑楂樺害锛堜笉鍖呭惈琛ㄥご锛夛紝绌哄�兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�',
-      min: 10,
+      tooltip: '琛ㄦ牸鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚〃澶达級锛岀┖鍊兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
       max: 3000,
       precision: 0,
       required: false,
diff --git a/src/menu/components/table/edit-table/options.jsx b/src/menu/components/table/edit-table/options.jsx
index 50145c1..31d0eb1 100644
--- a/src/menu/components/table/edit-table/options.jsx
+++ b/src/menu/components/table/edit-table/options.jsx
@@ -45,10 +45,10 @@
     {
       type: 'number',
       field: 'height',
-      label: '琛ㄦ牸楂樺害',
+      label: '鏈�澶ч珮搴�',
       initval: wrap.height || '',
-      tooltip: '琛ㄦ牸鍐呭鍖虹殑楂樺害锛堜笉鍖呭惈琛ㄥご锛夛紝绌哄�兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�',
-      min: 10,
+      tooltip: '琛ㄦ牸鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚〃澶达級锛岀┖鍊兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
       max: 3000,
       precision: 0,
       required: false
diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx
index d1d10bf..c7a8433 100644
--- a/src/menu/components/table/normal-table/options.jsx
+++ b/src/menu/components/table/normal-table/options.jsx
@@ -52,10 +52,10 @@
     {
       type: 'number',
       field: 'height',
-      label: '琛ㄦ牸楂樺害',
+      label: '鏈�澶ч珮搴�',
       initval: wrap.height || '',
-      tooltip: '琛ㄦ牸鍐呭鍖虹殑楂樺害锛堜笉鍖呭惈琛ㄥご锛夛紝绌哄�兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮銆�',
-      min: 10,
+      tooltip: '琛ㄦ牸鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚〃澶达級锛岀┖鍊兼椂楂樺害鑷�傚簲銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
       max: 3000,
       precision: 0,
       required: false,
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 5ac339b..1e25f5f 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -189,7 +189,14 @@
     }
 
     if (_config.wrap.zHeight) {
-      _config.wrap.zHeight = _config.wrap.zHeight <= 100 ? _config.wrap.zHeight + 'vh' : _config.wrap.zHeight
+      if (_config.wrap.zHeight <= 100) {
+        if (_config.wrap.zHeight < 0) {
+          _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+        } else {
+          _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+        }
+      }
+
       if (_config.style) {
         delete _config.style.height
       }
diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx
index 3e78040..0000c90 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -131,7 +131,13 @@
 
     if (_config.wrap.zHeight || _config.wrap.minWidth) {
       if (_config.wrap.zHeight) {
-        _config.wrap.zHeight = _config.wrap.zHeight <= 100 ? _config.wrap.zHeight + 'vh' : _config.wrap.zHeight
+        if (_config.wrap.zHeight <= 100) {
+          if (_config.wrap.zHeight < 0) {
+            _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+          } else {
+            _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+          }
+        }
         _config.wrap.wrapClass += ' fix-height'
       }
       _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%'
diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index fbb737b..5390036 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -1169,8 +1169,14 @@
     }
 
     let height = setting.height || false
-    if (height && height <= 100) {
-      height = height + 'vh'
+    if (height) {
+      if (height <= 100) {
+        if (height < 0) {
+          height = `calc(100vh - ${-height}px)`
+        } else {
+          height = height + 'vh'
+        }
+      }
     }
     let loading = this.props.loading
     if (setting.mask === 'hidden') {
diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
index f0037fb..916818a 100644
--- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -2653,8 +2653,14 @@
     }
 
     let height = setting.height || false
-    if (height && height <= 100) {
-      height = height + 'vh'
+    if (height) {
+      if (height <= 100) {
+        if (height < 0) {
+          height = `calc(100vh - ${-height}px)`
+        } else {
+          height = height + 'vh'
+        }
+      }
     }
 
     let style = {

--
Gitblit v1.8.0