fix(frontend): 移除DataTable中未使用的函数和变量

- 移除未使用的 hasExpandableActions 计算属性
- 移除未使用的 toggleActionsExpanded 函数
- 修复 TypeScript 类型检查错误
This commit is contained in:
IanShaw027 2025-12-28 14:47:55 +08:00
parent d895a2c469
commit 386f6da14d

View File

@ -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'