直接上代码:
import { Modal } from "antd";
import { CloseCircleOutlined } from "@ant-design/icons";
<Modal
className="amodal"
destroyOnClose={true}
open={isModalOpen}
onOk={handleOk}
onCancel={handleCancel}
width={"100vw"}
title={null}
footer={null}
style={{
top: 0,
padding: 0,
margin: 0,
}}
closeIcon={
<CloseCircleOutlined
style={{
color: "red",
fontSize: "25px",
}}
/>
}
>
<iframe
src={ifUrl}
style={{
width: "calc(100vw)",
height: "99vh",
border: 0,
}}
/>
</Modal>
.amodal {
max-width: calc(100vw) !important;
}