Commit ee149c72 authored by chenshouchao's avatar chenshouchao

feat: 点击弹窗外不关闭

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