1.12 提交
This commit is contained in:
32
src/components/ApprovalModal/index.tsx
Normal file
32
src/components/ApprovalModal/index.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Modal } from 'antd';
|
||||
|
||||
interface ApprovalModalProps {
|
||||
modalVisible: boolean;
|
||||
onCancel: () => void;
|
||||
url: string;
|
||||
}
|
||||
/**
|
||||
* 审批流程弹窗
|
||||
*/
|
||||
const ApprovalModal: React.FC<ApprovalModalProps> = (props) => {
|
||||
const { modalVisible, onCancel, url } = props;
|
||||
const iframeContent = useMemo(() => {
|
||||
return url != "" && <iframe width={"100%"} height={600} src={url} />
|
||||
}, [url]);
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title="审批流程"
|
||||
visible={modalVisible}
|
||||
width={"80%"}
|
||||
centered
|
||||
onCancel={() => onCancel()}
|
||||
footer={null}
|
||||
>
|
||||
{iframeContent}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApprovalModal;
|
Reference in New Issue
Block a user