mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-09 11:10:34 +08:00
fix: Optimize the trigger method for table selection (#10268)
Refs #10262
This commit is contained in:
parent
cc6b506176
commit
bcfc78e510
2 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<template #default="{ row }">
|
||||
<div v-for="(item, index) in row.labels" :key="index">
|
||||
<div v-if="row.expand || (!row.expand && index < 3)">
|
||||
<el-tag type="info">{{ item }}</el-tag>
|
||||
<el-button class="mt-0.5" plain size="small">{{ item }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!row.expand && row.labels.length > 3">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue