|
|
@ -23,6 +23,7 @@ import { |
|
|
|
provide, |
|
|
|
provide, |
|
|
|
reactive, |
|
|
|
reactive, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
|
|
|
|
useClipboard, |
|
|
|
useEventListener, |
|
|
|
useEventListener, |
|
|
|
useGridViewColumnWidth, |
|
|
|
useGridViewColumnWidth, |
|
|
|
useI18n, |
|
|
|
useI18n, |
|
|
@ -96,6 +97,8 @@ const { |
|
|
|
|
|
|
|
|
|
|
|
const { loadGridViewColumns, updateWidth, resizingColWidth, resizingCol } = useGridViewColumnWidth(view) |
|
|
|
const { loadGridViewColumns, updateWidth, resizingColWidth, resizingCol } = useGridViewColumnWidth(view) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { copy } = useClipboard() |
|
|
|
|
|
|
|
|
|
|
|
onMounted(loadGridViewColumns) |
|
|
|
onMounted(loadGridViewColumns) |
|
|
|
|
|
|
|
|
|
|
|
provide(IsFormInj, ref(false)) |
|
|
|
provide(IsFormInj, ref(false)) |
|
|
@ -113,8 +116,15 @@ provide(ReadonlyInj, !hasEditPermission) |
|
|
|
const disableUrlOverlay = ref(false) |
|
|
|
const disableUrlOverlay = ref(false) |
|
|
|
provide(CellUrlDisableOverlayInj, disableUrlOverlay) |
|
|
|
provide(CellUrlDisableOverlayInj, disableUrlOverlay) |
|
|
|
|
|
|
|
|
|
|
|
reloadViewDataHook?.on(async () => { |
|
|
|
const showLoading = ref(true) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reloadViewDataHook?.on(async (shouldShowLoading) => { |
|
|
|
|
|
|
|
// set value if spinner should be hidden |
|
|
|
|
|
|
|
showLoading.value = !!shouldShowLoading |
|
|
|
await loadData() |
|
|
|
await loadData() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// reset to default (showing spinner on load) |
|
|
|
|
|
|
|
showLoading.value = true |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const skipRowRemovalOnCancel = ref(false) |
|
|
|
const skipRowRemovalOnCancel = ref(false) |
|
|
@ -179,8 +189,6 @@ const clearCell = async (ctx: { row: number; col: number }) => { |
|
|
|
await updateOrSaveRow(rowObj, columnObj.title) |
|
|
|
await updateOrSaveRow(rowObj, columnObj.title) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { copy } = useClipboard() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const makeEditable = (row: Row, col: ColumnType) => { |
|
|
|
const makeEditable = (row: Row, col: ColumnType) => { |
|
|
|
if (!hasEditPermission || editEnabled || isView) { |
|
|
|
if (!hasEditPermission || editEnabled || isView) { |
|
|
|
return |
|
|
|
return |
|
|
@ -373,10 +381,12 @@ onBeforeUnmount(async () => { |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="flex flex-col h-full min-h-0 w-full"> |
|
|
|
<div class="flex flex-col h-full min-h-0 w-full"> |
|
|
|
<div v-if="isLoading" class="flex items-center justify-center h-full w-full"> |
|
|
|
<general-overlay :model-value="isLoading" inline transition> |
|
|
|
<a-spin size="large" /> |
|
|
|
<div class="flex items-center justify-center h-full w-full"> |
|
|
|
</div> |
|
|
|
<a-spin size="large" /> |
|
|
|
<div v-else class="nc-grid-wrapper min-h-0 flex-1 scrollbar-thin-dull"> |
|
|
|
</div> |
|
|
|
|
|
|
|
</general-overlay> |
|
|
|
|
|
|
|
<div class="nc-grid-wrapper min-h-0 flex-1 scrollbar-thin-dull"> |
|
|
|
<a-dropdown |
|
|
|
<a-dropdown |
|
|
|
v-model:visible="contextMenu" |
|
|
|
v-model:visible="contextMenu" |
|
|
|
:trigger="isSqlView ? [] : ['contextmenu']" |
|
|
|
:trigger="isSqlView ? [] : ['contextmenu']" |
|
|
|