mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
Merge pull request #7764 from wibetter/master
fix(amis-ui): chart组件剔除默认最小宽高样式限制,支持特小宽高设置
This commit is contained in:
commit
d8cc3fb2e0
@ -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 || '100%';
|
||||
style.height = style.width || height || '300px';
|
||||
const styleVar = buildStyle(style, data);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user