Commit ee149c72 authored by chenshouchao's avatar chenshouchao

feat: 点击弹窗外不关闭

parent ca9eacba
...@@ -26,7 +26,11 @@ const MyDialog = (props: any) => { ...@@ -26,7 +26,11 @@ const MyDialog = (props: any) => {
setOpen(true); setOpen(true);
}; };
const handleClose = () => { const handleClose = (event: any = {}, reason: any = "other") => {
// 点击弹窗外不关闭弹窗
if (reason === "backdropClick") {
return;
}
setOpen(false); setOpen(false);
}; };
......
...@@ -386,7 +386,7 @@ const ProjectData = observer(() => { ...@@ -386,7 +386,7 @@ const ProjectData = observer(() => {
size="small" size="small"
onClick={() => hanleShowMoveFileDialog(item)} onClick={() => hanleShowMoveFileDialog(item)}
disabled={ disabled={
selectIds.length > 0 && !isPass("PROJECT_DATA_MOVE", "USER") selectIds.length > 0 || !isPass("PROJECT_DATA_MOVE", "USER")
} }
> >
移动至 移动至
...@@ -398,7 +398,7 @@ const ProjectData = observer(() => { ...@@ -398,7 +398,7 @@ const ProjectData = observer(() => {
color="error" color="error"
onClick={() => hanleDeleteFile(item)} onClick={() => hanleDeleteFile(item)}
disabled={ disabled={
selectIds.length > 0 && !isPass("PROJECT_DATA_DELETE", "USER") selectIds.length > 0 || !isPass("PROJECT_DATA_DELETE", "USER")
} }
> >
删除 删除
...@@ -429,7 +429,11 @@ const ProjectData = observer(() => { ...@@ -429,7 +429,11 @@ const ProjectData = observer(() => {
}; };
// 删除文件 // 删除文件
const handleDeleteDialogClose = () => { const handleDeleteDialogClose = (event: any = {}, reason: any = "other") => {
// 点击弹窗外不关闭弹窗
if (reason === "backdropClick") {
return;
}
setDeleteDialogOpen(false); setDeleteDialogOpen(false);
}; };
......
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