From 2c573446cd5059b09c06c8673eaf1f51f43967ce Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 14 六月 2024 13:44:27 +0800
Subject: [PATCH] 2024-06-14

---
 src/tabviews/custom/components/share/normalTable/index.jsx |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index fbb737b..25493d5 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -446,7 +446,12 @@
         content = <span dangerouslySetInnerHTML={{__html: content}}></span>
       } else if (content !== '') {
         content = `${col.prefix || ''}${content}${col.postfix || ''}`
-        content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
+        if (!col.evalchars || col.evalchars.includes('enter')) {
+          content = content.replace(/\n/ig, '<br/>')
+        }
+        if (!col.evalchars || col.evalchars.includes('space')) {
+          content = content.replace(/\s/ig, '&nbsp;')
+        }
         content = <span dangerouslySetInnerHTML={{__html: content}}></span>
       }
 
@@ -1169,8 +1174,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') {

--
Gitblit v1.8.0