|
|
@ -12,6 +12,7 @@ const props = defineProps<{ |
|
|
|
setIcon: (icon: string, table: TableType) => Promise<void> |
|
|
|
setIcon: (icon: string, table: TableType) => Promise<void> |
|
|
|
activeTable: ComputedRef<string | null | undefined> |
|
|
|
activeTable: ComputedRef<string | null | undefined> |
|
|
|
openRenameTableDialog: (table: TableType, baseId?: string | undefined, rightClick?: boolean) => void |
|
|
|
openRenameTableDialog: (table: TableType, baseId?: string | undefined, rightClick?: boolean) => void |
|
|
|
|
|
|
|
addTableTab: (table: TableType) => void |
|
|
|
}>() |
|
|
|
}>() |
|
|
|
|
|
|
|
|
|
|
|
const table = useVModel(props, 'modelValue') // , emits) |
|
|
|
const table = useVModel(props, 'modelValue') // , emits) |
|
|
@ -35,19 +36,18 @@ const { isUIAllowed } = useUIPermission() |
|
|
|
<div |
|
|
|
<div |
|
|
|
:key="table.id" |
|
|
|
:key="table.id" |
|
|
|
v-e="['a:table:open']" |
|
|
|
v-e="['a:table:open']" |
|
|
|
:class="[ |
|
|
|
class="nc-tree-item text-sm group" |
|
|
|
{ hidden: !filteredTables?.includes(table), active: activeTable === table.id }, |
|
|
|
|
|
|
|
`nc-project-tree-tbl nc-project-tree-tbl-${table.title}`, |
|
|
|
|
|
|
|
]" |
|
|
|
|
|
|
|
class="nc-tree-item text-sm cursor-pointer group" |
|
|
|
|
|
|
|
:data-order="table.order" |
|
|
|
:data-order="table.order" |
|
|
|
:data-id="table.id" |
|
|
|
:data-id="table.id" |
|
|
|
:data-testid="`tree-view-table-${table.title}`" |
|
|
|
:data-testid="`tree-view-table-${table.title}`" |
|
|
|
@click="addTableTab(table)" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<GeneralTooltip class="pl-2 pr-3 py-2" modifier-key="Alt"> |
|
|
|
<GeneralTooltip class="pl-2 pr-3 py-2" modifier-key="Alt"> |
|
|
|
<template #title>{{ table.table_name }}</template> |
|
|
|
<template #title>{{ table.table_name }}</template> |
|
|
|
<div class="flex items-center gap-2 h-full" @contextmenu="setMenuContext('table', table)"> |
|
|
|
<div |
|
|
|
|
|
|
|
class="flex items-center gap-2 h-full cursor-pointer" |
|
|
|
|
|
|
|
@contextmenu="setMenuContext('table', table)" |
|
|
|
|
|
|
|
@click="addTableTab(table)" |
|
|
|
|
|
|
|
> |
|
|
|
<div class="flex w-auto" :data-testid="`tree-view-table-draggable-handle-${table.title}`"> |
|
|
|
<div class="flex w-auto" :data-testid="`tree-view-table-draggable-handle-${table.title}`"> |
|
|
|
<component |
|
|
|
<component |
|
|
|
:is="isUIAllowed('tableIconCustomisation') ? Dropdown : 'div'" |
|
|
|
:is="isUIAllowed('tableIconCustomisation') ? Dropdown : 'div'" |
|
|
|