diff --git a/components/diy/modules/custom/data-group-rendering.vue b/components/diy/modules/custom/data-group-rendering.vue index e5a9e423..b754c56b 100644 --- a/components/diy/modules/custom/data-group-rendering.vue +++ b/components/diy/modules/custom/data-group-rendering.vue @@ -134,8 +134,8 @@ export default { if (typeof max_size === 'number' && max_size >= 0) { const scaledMaxSize = max_size * this.propScale; 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;'; diff --git a/components/diy/modules/custom/data-rendering.vue b/components/diy/modules/custom/data-rendering.vue index 4ffa05a3..8cba5994 100644 --- a/components/diy/modules/custom/data-rendering.vue +++ b/components/diy/modules/custom/data-rendering.vue @@ -145,8 +145,8 @@ export default { if (typeof max_size === 'number' && max_size >= 0) { const scaledMaxSize = max_size * this.propScale; 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;';