Merge pull request #7764 from wibetter/master

fix(amis-ui): chart组件剔除默认最小宽高样式限制,支持特小宽高设置
This commit is contained in:
wutong 2023-08-10 15:21:08 +08:00 committed by GitHub
commit d8cc3fb2e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 || '100%';
style.height = style.width || height || '300px';
const styleVar = buildStyle(style, data);
return (