diff --git a/packages/nc-gui-v2/components/template/Editor.vue b/packages/nc-gui-v2/components/template/Editor.vue index 0cfa323e37..aed8ef8312 100644 --- a/packages/nc-gui-v2/components/template/Editor.vue +++ b/packages/nc-gui-v2/components/template/Editor.vue @@ -92,8 +92,6 @@ const validators = computed(() => }, {}), ) -const editorTitle = computed(() => `${quickImportType.toUpperCase()} Import: ${data.title}`) - const { validate, validateInfos } = useForm(data, validators) function filterOption(input: string, option: Option) { @@ -229,7 +227,7 @@ async function importTemplate() { await $api.dbTableColumn.primaryColumnSet(tableMeta.columns[0].id as string) } } - // bulk imsert data + // bulk insert data if (importData) { let total = 0 let progress = 0 @@ -244,7 +242,7 @@ async function importTemplate() { for (let i = 0; i < data.length; i += offset) { importingTip.value = `Importing data to ${projectName}: ${progress}/${total} records` const batchData = remapColNames(data.slice(i, i + offset), tableMeta.columns) - await $api.dbTableRow.bulkCreate('noco', projectName, tableMeta.table_title, batchData) + await $api.dbTableRow.bulkCreate('noco', projectName, tableMeta.title, batchData) progress += batchData.length } } @@ -265,16 +263,15 @@ async function importTemplate() { isImporting.value = false } } + +defineExpose({ + importTemplate, +})