From bcfc78e5100277db773bd572a950b00d6e7afae8 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 4 Sep 2025 18:23:32 +0800 Subject: [PATCH] fix: Optimize the trigger method for table selection (#10268) Refs #10262 --- frontend/src/components/complex-table/index.vue | 8 +++++++- frontend/src/views/container/network/index.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/complex-table/index.vue b/frontend/src/components/complex-table/index.vue index 8530f9cea..631390c75 100644 --- a/frontend/src/components/complex-table/index.vue +++ b/frontend/src/components/complex-table/index.vue @@ -195,8 +195,14 @@ watch( { immediate: true }, ); -function handleRowClick(row: any, column: any, event: MouseEvent) { +function handleRowClick(row: any, column: any, event: any) { if (!tableRef.value) return; + try { + const selectionColumn = tableRef.value.refElTable.columns.find((col) => col.type === 'selection'); + const isSelectable = selectionColumn.selectable(row); + if (!isSelectable) return; + } catch {} + const target = event.target as HTMLElement; if (target.closest('.el-checkbox')) return; diff --git a/frontend/src/views/container/network/index.vue b/frontend/src/views/container/network/index.vue index 5063ef3a8..b9a59cbc8 100644 --- a/frontend/src/views/container/network/index.vue +++ b/frontend/src/views/container/network/index.vue @@ -63,7 +63,7 @@