Commit dada8653 authored by chenshouchao's avatar chenshouchao

feat: 确认提示框修改, 解决同一页面多个弹窗一起出现的问题

parent 37d579c4
......@@ -102,3 +102,107 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
};
export default MyPopconfirm;
// // 确认提示框, 支持同一页面多个提示框
// import * as React from "react";
// import { ReactNode, useMemo } from "react";
// import Box from "@mui/material/Box";
// import ButtonComponent from "./Button";
// import tipsIcon from "@/assets/project/information-outline.svg";
// import Popper from "@mui/material/Popper";
// type IMyPopconfirmProps = {
// title: string | ReactNode;
// placement?: 'auto-end'
// | 'auto-start'
// | 'auto'
// | 'bottom-end'
// | 'bottom-start'
// | 'bottom'
// | 'left-end'
// | 'left-start'
// | 'left'
// | 'right-end'
// | 'right-start'
// | 'right'
// | 'top-end'
// | 'top-start'
// | 'top';
// anchorEl?: null | HTMLElement;
// cancelText?: string;
// okText?: string;
// showCancel?: boolean;
// onCancel?: any;
// onConfirm?: any;
// };
// const MyPopconfirm = (props: IMyPopconfirmProps) => {
// const {
// title,
// anchorEl,
// placement='bottom',
// cancelText = "取消",
// okText = "确认",
// showCancel = true,
// onCancel,
// onConfirm,
// } = props;
// const open = useMemo(()=>{
// return Boolean(anchorEl)
// }, [anchorEl])
// const id = open ? "simple-popper" : undefined;
// const handleCancel = () => {
// onCancel && onCancel();
// };
// const handleOk = () => {
// onConfirm && onConfirm();
// };
// return (
// <Popper
// id={id}
// open={open}
// anchorEl={anchorEl}
// placement={placement}
// sx={{
// zIndex: 2000,
// bgcolor: "#fff",
// minWidth: "200px",
// borderRadius: "2px",
// padding: "20px 16px",
// boxShadow: "0px 3px 10px 0px rgba(0, 24, 57, 0.14)",
// }}
// >
// <Box sx={{ marginBottom: "16px" }}>
// <img
// style={{ marginRight: "12px", position: "relative", top: "3px" }}
// src={tipsIcon}
// alt=""
// />
// {title}
// </Box>
// <Box sx={{ display: "flex", justifyContent: "flex-end" }}>
// {showCancel && (
// <ButtonComponent
// text={cancelText}
// size="small"
// color="inherit"
// click={handleCancel}
// style={{ marginRight: "12px" }}
// ></ButtonComponent>
// )}
// <ButtonComponent
// text={okText}
// size="small"
// click={handleOk}
// ></ButtonComponent>
// </Box>
// </Popper>
// );
// };
// export default MyPopconfirm;
......@@ -163,28 +163,4 @@
font-size: 14px;
color: #8A9099;
line-height: 22px;
}
/* <div
className={styles.parameter}
key={parameter.id || "" + parameterIndex}
>
<div className={styles.parameterTop}>
<div className={styles.parameterLeft}>
<div
className={classNames({
[styles.parameterTitle]: true,
[styles.required]: parameter.required,
})}
>
{parameter.name}
</div>
<div className={styles.parameterClassTypeName}>
{parameter.classTypeName}
</div>
</div>
<MySwitch value={parameter.hidden}></MySwitch>
</div>
<div className={styles.parameterContent}>
{renderInput(parameter)}
</div>
</div> */
\ No newline at end of file
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment