diff --git a/packages/nc-gui/components/cell/attachment/index.vue b/packages/nc-gui/components/cell/attachment/index.vue
index 8c88a86b4e..5093eee409 100644
--- a/packages/nc-gui/components/cell/attachment/index.vue
+++ b/packages/nc-gui/components/cell/attachment/index.vue
@@ -65,7 +65,7 @@ watch(
} else {
nextTick(() => {
const nextCell = cellRefs.value.reduceRight((cell, curr) => {
- if (!cell && curr.dataset.key === `${rowIndex}${column.value.id}`) cell = curr
+ if (!cell && curr.dataset.key === `${rowIndex}${column.value!.id}`) cell = curr
return cell
}, undefined as HTMLTableDataCellElement | undefined)
@@ -118,7 +118,7 @@ onKeyDown('Escape', () => {
watch(
() => storedFiles.value.length || 0,
() => {
- rowState.value[column.value.title!] = storedFiles.value
+ rowState.value[column.value!.title!] = storedFiles.value
},
)
diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts
index 453aa345e8..975b84d624 100644
--- a/packages/nc-gui/components/cell/attachment/utils.ts
+++ b/packages/nc-gui/components/cell/attachment/utils.ts
@@ -1,9 +1,9 @@
import { message } from 'ant-design-vue'
import FileSaver from 'file-saver'
-import { useI18n } from 'vue-i18n'
import {
ColumnInj,
EditModeInj,
+ IsFormInj,
IsPublicInj,
MetaInj,
NOCO,
@@ -14,11 +14,11 @@ import {
ref,
useApi,
useFileDialog,
+ useI18n,
useInjectionState,
useProject,
watch,
} from '#imports'
-import { IsFormInj } from '~/context'
import MdiPdfBox from '~icons/mdi/pdf-box'
import MdiFileWordOutline from '~icons/mdi/file-word-outline'
import MdiFilePowerpointBox from '~icons/mdi/file-powerpoint-box'
@@ -40,9 +40,9 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
const isForm = inject(IsFormInj, ref(false))
- const meta = inject(MetaInj)!
+ const meta = inject(MetaInj, ref())
- const column = inject(ColumnInj)!
+ const column = inject(ColumnInj, ref())
const editEnabled = inject(EditModeInj, ref(false))
@@ -119,7 +119,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
try {
const data = await api.storage.upload(
{
- path: [NOCO, project.value.title, meta.value.title, column.value.title].join('/'),
+ path: [NOCO, project.value.title, meta.value?.title, column.value?.title].join('/'),
},
{
files: file,
diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue
index b4f93a7778..1b1c9de92f 100644
--- a/packages/nc-gui/components/dashboard/TreeView.vue
+++ b/packages/nc-gui/components/dashboard/TreeView.vue
@@ -104,7 +104,7 @@ const initSortable = (el: Element) => {
// update the item order
await $api.dbTable.reorder(item.id as string, {
- order: item.order as any,
+ order: item.order,
})
},
animation: 150,
@@ -142,7 +142,7 @@ const reloadTables = async () => {
}
const addTableTab = (table: TableType) => {
- addTab({ title: table.title, id: table.id, type: table.type as any })
+ addTab({ title: table.title, id: table.id, type: table.type as TabType })
}
function openRenameTableDialog(table: TableType, rightClick = false) {
@@ -286,7 +286,7 @@ function openTableCreateDialog() {