修改最大宽度和高度的处理逻辑
parent
326820cc51
commit
3b85dc9949
|
|
@ -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;';
|
||||
|
|
|
|||
Loading…
Reference in New Issue