mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix(amis-ui): chart组件剔除默认最小宽高样式限制,支持特小宽高设置
This commit is contained in:
parent
24516cc0c2
commit
1cada5c996
@ -1,6 +1,4 @@
|
||||
.#{$ns}Chart {
|
||||
min-width: 300px;
|
||||
min-height: 300px;
|
||||
position: relative;
|
||||
|
||||
&-placeholder {
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user