From 3b85dc9949673e8777c7a0b0198c295296ac3068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Thu, 27 Feb 2025 11:52:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=80=E5=A4=A7=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E5=92=8C=E9=AB=98=E5=BA=A6=E7=9A=84=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/custom-module/data-rendering/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/custom-module/data-rendering/index.vue b/src/components/common/custom-module/data-rendering/index.vue index d620e7fb..1effc4fe 100644 --- a/src/components/common/custom-module/data-rendering/index.vue +++ b/src/components/common/custom-module/data-rendering/index.vue @@ -201,8 +201,8 @@ watch(() => props.customList, async (val) => { if (typeof max_size === 'number' && max_size >= 0) { const scaledMaxSize = max_size * props.scale; const autoStyle = 'auto;'; - const maxSizeStyle = ` max-${type}: ${scaledMaxSize}px;`; - const whiteSpaceStyle = type === 'width' ? ' white-space:nowrap;' : ''; + const maxSizeStyle = scaledMaxSize > 0 ? ` max-${type}: ${scaledMaxSize}px;` : ''; + const whiteSpaceStyle = type === 'width' && scaledMaxSize <= 0 ? ' white-space:nowrap;' : ''; return `${ autoStyle }${ maxSizeStyle }${ whiteSpaceStyle }`; } else { return 'auto;';