From 386f6da14d4d5c1f25558e598b8d7ef36a60c356 Mon Sep 17 00:00:00 2001 From: IanShaw027 <131567472+IanShaw027@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:47:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E7=A7=BB=E9=99=A4DataTable?= =?UTF-8?q?=E4=B8=AD=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除未使用的 hasExpandableActions 计算属性 - 移除未使用的 toggleActionsExpanded 函数 - 修复 TypeScript 类型检查错误 --- frontend/src/components/common/DataTable.vue | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/frontend/src/components/common/DataTable.vue b/frontend/src/components/common/DataTable.vue index 27eb61cc..c160da26 100644 --- a/frontend/src/components/common/DataTable.vue +++ b/frontend/src/components/common/DataTable.vue @@ -271,26 +271,6 @@ const sortedData = computed(() => { }) }) -// 检查是否有可展开的操作列 -const hasExpandableActions = computed(() => { - // 如果明确指定了actionsCount,使用它来判断 - if (props.actionsCount !== undefined) { - return props.expandableActions && props.columns.some((col) => col.key === 'actions') && props.actionsCount > 2 - } - - // 否则使用原来的检测逻辑 - return ( - props.expandableActions && - props.columns.some((col) => col.key === 'actions') && - actionsColumnNeedsExpanding.value - ) -}) - -// 切换操作列展开/折叠状态 -const toggleActionsExpanded = () => { - actionsExpanded.value = !actionsExpanded.value -} - // 检查第一列是否为勾选列 const hasSelectColumn = computed(() => { return props.columns.length > 0 && props.columns[0].key === 'select'