|
@@ -1,7 +1,7 @@
|
|
|
/*
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-11-19 15:20:40
|
|
|
- * @LastEditTime: 2021-12-20 11:23:06
|
|
|
+ * @LastEditTime: 2021-12-21 16:29:08
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/index/components/iframePage/index.tsx
|
|
@@ -17,13 +17,19 @@ import './style.less';
|
|
|
export interface IframePage {
|
|
|
activedItem?: SystemListItem;
|
|
|
list: SystemListItem[];
|
|
|
+ onload?:()=>void,
|
|
|
}
|
|
|
//http://118.31.245.65:8804/user/login/?redirect=%2FDataManagement%2FpublicData&hospSign=tYAoFaa20yCAgaiy
|
|
|
|
|
|
-const Iframe = ({ id, url }: SystemListItem) => {
|
|
|
+interface A extends SystemListItem {
|
|
|
+ onload?:()=>void
|
|
|
+}
|
|
|
+
|
|
|
+const Iframe = ({ id, url,onload }:A ) => {
|
|
|
const [loading, setLoading] = useState(true);
|
|
|
|
|
|
const onLoadHandle = () => {
|
|
|
+ onload&&onload();
|
|
|
setLoading(false);
|
|
|
};
|
|
|
|
|
@@ -38,20 +44,10 @@ const Iframe = ({ id, url }: SystemListItem) => {
|
|
|
};
|
|
|
|
|
|
const IframePage: React.FC<IframePage> = (props) => {
|
|
|
- const { list, activedItem } = props;
|
|
|
+ const { list, activedItem,onload } = props;
|
|
|
|
|
|
return (
|
|
|
<div className="iframeContainer">
|
|
|
- {/* {
|
|
|
- loading && (
|
|
|
- <div className='content'>
|
|
|
- <div className='spin'>
|
|
|
- <LoadingOutlined style={{ fontSize: 24 }} spin />
|
|
|
- <span>努力加载中...</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- )
|
|
|
- } */}
|
|
|
{list.map((item) => (
|
|
|
<div
|
|
|
key={item.id}
|
|
@@ -62,7 +58,7 @@ const IframePage: React.FC<IframePage> = (props) => {
|
|
|
zIndex: activedItem && activedItem.id == item.id ? 9 : 1,
|
|
|
}}
|
|
|
>
|
|
|
- <Iframe {...item} />
|
|
|
+ <Iframe {...item} onload={onload} />
|
|
|
</div>
|
|
|
))}
|
|
|
</div>
|