import type { KeyType, TableColumn, TableColumnInGroup, } from '../type' import { Ref } from 'vue' export default function useTableColumnSet( tableColumns: Ref ) { const filterColumnKeys = ref([]) const filteredColumns = computed(() => tableColumns.value.filter(({ dataKey }) => filterColumnKeys.value.includes(dataKey) ) ) const columnChecked = (checkedColumnKeys: string[]) => { filterColumnKeys.value = checkedColumnKeys } return { columnChecked, filteredColumns, } }