From 9f56e866f20f932c6c130b7775eff06661e583dd Mon Sep 17 00:00:00 2001 From: logan Date: Sat, 23 May 2026 23:38:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E9=81=AE=E7=BD=A9=E5=B1=82=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=85=B3=E9=97=AD=20=E2=80=94=20=E9=98=B2=E6=AD=A2=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=97=B6=E8=AF=AF=E8=A7=A6=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 涉及文件 (12处): - InstancePage.tsx: 添加数据源弹框 - UsersPage.tsx: 新建/编辑/重置密码/详情弹框 (4处) - RolesPage.tsx: 克隆角色弹框 - InstanceGroupPage.tsx: 新建/编辑/关联实例/关联用户弹框 (4处) - SlowQueryPage.tsx: 查询对比弹框 - RedisDetailPage.tsx: 键详情/新增键弹框 (2处) 改动: 遮罩层div移除onClick,只能通过X按钮或取消按钮关闭 --- frontend/src/pages/InstanceGroupPage.tsx | 8 ++++---- frontend/src/pages/InstancePage.tsx | 2 +- frontend/src/pages/RedisDetailPage.tsx | 4 ++-- frontend/src/pages/RolesPage.tsx | 2 +- frontend/src/pages/SlowQueryPage.tsx | 2 +- frontend/src/pages/UsersPage.tsx | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/src/pages/InstanceGroupPage.tsx b/frontend/src/pages/InstanceGroupPage.tsx index be1e050..398bace 100644 --- a/frontend/src/pages/InstanceGroupPage.tsx +++ b/frontend/src/pages/InstanceGroupPage.tsx @@ -703,7 +703,7 @@ export default function InstanceGroupPage() { {/* Create Modal */} {showCreateModal && ( -
{ setShowCreateModal(false); resetForm(); }}> +
e.stopPropagation()}>

新建权限组

{renderGroupForm(handleCreate, '创建')} @@ -713,7 +713,7 @@ export default function InstanceGroupPage() { {/* Edit Modal */} {showEditModal && ( -
{ setShowEditModal(false); resetForm(); }}> +
e.stopPropagation()}>

编辑权限组

{renderGroupForm(handleEdit, '保存')} @@ -723,7 +723,7 @@ export default function InstanceGroupPage() { {/* Instance Modal with search */} {showInstanceModal && ( -
setShowInstanceModal(false)}> +
e.stopPropagation()}>

关联实例

@@ -758,7 +758,7 @@ export default function InstanceGroupPage() { {/* User Modal with search */} {showUserModal && ( -
setShowUserModal(false)}> +
e.stopPropagation()}>

关联用户

diff --git a/frontend/src/pages/InstancePage.tsx b/frontend/src/pages/InstancePage.tsx index a6433ee..136dde4 100644 --- a/frontend/src/pages/InstancePage.tsx +++ b/frontend/src/pages/InstancePage.tsx @@ -991,7 +991,7 @@ function CreateInstanceForm({ defaultType, onCancel, onCreated }: { const labelCls = 'block text-sm font-medium mb-1.5'; return ( -
+
e.stopPropagation()} diff --git a/frontend/src/pages/RedisDetailPage.tsx b/frontend/src/pages/RedisDetailPage.tsx index 82f1b1b..fd46cc4 100644 --- a/frontend/src/pages/RedisDetailPage.tsx +++ b/frontend/src/pages/RedisDetailPage.tsx @@ -246,7 +246,7 @@ export default function RedisDetailPage() { {/* 键详情弹窗 */} {selectedKey && ( -
+

键详情

@@ -268,7 +268,7 @@ export default function RedisDetailPage() { {/* 新增键弹窗 */} {showAddKey && ( -
+

新增键

diff --git a/frontend/src/pages/RolesPage.tsx b/frontend/src/pages/RolesPage.tsx index c83a038..52f129f 100644 --- a/frontend/src/pages/RolesPage.tsx +++ b/frontend/src/pages/RolesPage.tsx @@ -553,7 +553,7 @@ function CloneRoleModal({ sourceRole, onClose }: { sourceRole: Role; onClose: () }; return ( -
+
e.stopPropagation()}>

克隆角色

diff --git a/frontend/src/pages/SlowQueryPage.tsx b/frontend/src/pages/SlowQueryPage.tsx index 00721d5..cccc6e2 100644 --- a/frontend/src/pages/SlowQueryPage.tsx +++ b/frontend/src/pages/SlowQueryPage.tsx @@ -893,7 +893,7 @@ export default function SlowQueryPage() { {/* Compare Modal */} {showCompare && compareLogs.length === 2 && ( -
setShowCompare(false)}> +
e.stopPropagation()}>

查询对比

diff --git a/frontend/src/pages/UsersPage.tsx b/frontend/src/pages/UsersPage.tsx index 258da1f..4a84aae 100644 --- a/frontend/src/pages/UsersPage.tsx +++ b/frontend/src/pages/UsersPage.tsx @@ -590,7 +590,7 @@ function CreateUserModal({ onClose, onCreated, setToast }: { onClose: () => void }; return ( -
+
e.stopPropagation()}>

新建用户

@@ -677,7 +677,7 @@ function EditUserModal({ user, onClose, onUpdated, setToast }: { user: UserItem; }; return ( -
+
e.stopPropagation()}>

编辑用户

@@ -758,7 +758,7 @@ function ResetPasswordModal({ user, onClose, setToast }: { user: UserItem; onClo }; return ( -
+
e.stopPropagation()}>

重置密码

@@ -795,7 +795,7 @@ function UserDetailModal({ user, onClose }: { user: UserItem; onClose: () => voi const activities = useMemo(() => generateMockActivities(user.id), [user.id]); return ( -
+
e.stopPropagation()}>

用户详情