import React, { useEffect, useState } from "react"; import { Button, Modal, Space } from "antd"; import RouterComponent from "@/routes/mes/routerComponent"; // 通用方法 import * as commonUtils from "@/utils/utils"; const CommonModalComponent = props => { const { visible, title, width = "calc(100vw - 110px)", height = "calc(100vh - 60px)", onCancel } = props; if (!visible) return ""; let { style } = props; if (commonUtils.isEmptyObject(style)) { style = { padding: 0, margin: 0, top: 60, left: 110 }; } const [extraBtns, setExtraBtns] = useState([]); let titleNew = props.sModelsId === "12710101117087374661080" ? props.parentProps.btnConfig.showName : title; if (props.copyTo?.table0?.[0]?.sPrompt) { titleNew = (