trunk/pc4mobx/organization/components/resource/IframeItem.js

55 lines
1.3 KiB
JavaScript
Raw Normal View History

2022-09-22 18:55:14 +08:00
import {
WeaFormItem,
} from 'ecCom'
import {
Spin,
Button,
} from 'antd'
import {
i18n
} from '../../public/i18n';
import '../../style/common.less';
import { chunk } from 'lodash';
export default class IframeItem extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
const {
2023-03-27 10:47:30 +08:00
iframeInfo,userid
2022-09-22 18:55:14 +08:00
} = this.props, {
} = this.state;
return (
2022-10-18 13:58:48 +08:00
<div className='iframe-item' id={iframeInfo.id} >
2022-09-22 18:55:14 +08:00
<div className='title'>
<div></div>
<p>{iframeInfo.title}</p>
</div>
2022-10-18 13:58:48 +08:00
<div className='content' >
<iframe
id={iframeInfo.id+"-iframe"}
2023-03-27 10:47:30 +08:00
src={iframeInfo.url.replaceAll("{#id}",userid)}
2022-10-18 13:58:48 +08:00
width="100%"
height="500px"
frameBorder="0"
scrolling="auto"
onLoad={() => {
// console.log(document.getElementById(iframeInfo.id+"-iframe").scrollHeight)
// document.getElementById(iframeInfo.id+"-iframe").height = 500 + "px"
}}
/>
2022-09-22 18:55:14 +08:00
</div>
</div>
)
}
}