fix(amis-ui): chart组件剔除默认最小宽高样式限制,支持特小宽高设置

This commit is contained in:
wibetter 2023-08-09 18:08:37 +08:00
parent 24516cc0c2
commit 1cada5c996
2 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,4 @@
.#{$ns}Chart {
min-width: 300px;
min-height: 300px;
position: relative;
&-placeholder {

View File

@ -596,9 +596,8 @@ export class Chart extends React.Component<ChartProps> {
data
} = this.props;
let style = this.props.style || {};
width && (style.width = width);
height && (style.height = height);
style.width = style.width || width || '300px';
style.height = style.width || height || '300px';
const styleVar = buildStyle(style, data);
return (