Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(portal-web): 文件管理重命名模态框双击触发文件列表双击事件 #960

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions apps/portal-web/src/pageComponents/filemanager/RenameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,27 @@ export const RenameModal: React.FC<Props> = ({ open, onClose, path, reload, clus
};

return (
<Modal
open={open}
title={t(p("title"))}
okText={t("button.confirmButton")}
cancelText={t("button.cancelButton")}
onCancel={onClose}
confirmLoading={loading}
destroyOnClose
onOk={form.submit}
>
<Form form={form} onFinish={onSubmit}>
<Form.Item label={t(p("renameLabel"))}>
<strong>{path}</strong>
</Form.Item>
<Form.Item<FormProps> label={t(p("newFileName"))} name="newFileName" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Form>
</Modal>
<div onDoubleClick={(event) => event.stopPropagation()}>
<Modal
open={open}
title={t(p("title"))}
okText={t("button.confirmButton")}
cancelText={t("button.cancelButton")}
onCancel={onClose}
confirmLoading={loading}
destroyOnClose
onOk={form.submit}
getContainer={false}
>
<Form form={form} onFinish={onSubmit}>
<Form.Item label={t(p("renameLabel"))}>
<strong>{path}</strong>
</Form.Item>
<Form.Item<FormProps> label={t(p("newFileName"))} name="newFileName" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Form>
</Modal>
</div>
);
};
Loading