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;';