mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
Merge remote-tracking branch 'baidu/master'
This commit is contained in:
commit
ed408b7817
@ -27,6 +27,8 @@ order: 51
|
||||
| frameBorder | `Array` | | frameBorder |
|
||||
| style | `object` | | 样式 |
|
||||
| src | `string` | | iframe地址 |
|
||||
| height | `string` | `"100%"` | iframe高 |
|
||||
| width | `string` | `"100%"` | iframe宽 |
|
||||
|
||||
|
||||
|
||||
|
@ -120,13 +120,15 @@ export default class IFrame extends React.Component<IFrameProps, object> {
|
||||
const {width, height} = this.state;
|
||||
let {className, src, frameBorder, data, style} = this.props;
|
||||
|
||||
let tempStyle: any = {};
|
||||
|
||||
width !== void 0 && (tempStyle.width = width);
|
||||
height !== void 0 && (tempStyle.height = height);
|
||||
|
||||
style = {
|
||||
...tempStyle,
|
||||
...style
|
||||
};
|
||||
|
||||
width !== void 0 && (style.width = width);
|
||||
height !== void 0 && (style.height = height);
|
||||
|
||||
return (
|
||||
<iframe
|
||||
className={className}
|
||||
|
Loading…
Reference in New Issue
Block a user