Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
dada8653
Commit
dada8653
authored
Jul 10, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 确认提示框修改, 解决同一页面多个弹窗一起出现的问题
parent
37d579c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
26 deletions
+106
-26
MyPopconfirm.tsx
src/components/mui/MyPopconfirm.tsx
+104
-0
index.module.css
...WorkFlowEdit/components/ParameterSetting/index.module.css
+2
-26
No files found.
src/components/mui/MyPopconfirm.tsx
View file @
dada8653
...
...
@@ -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;
src/views/WorkFlowEdit/components/ParameterSetting/index.module.css
View file @
dada8653
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment