1.12 提交

This commit is contained in:
jl-zhoujl2
2023-01-12 18:44:25 +08:00
parent 7fb6242e0c
commit f2a1835aff
9 changed files with 106 additions and 34 deletions

View 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;