diff --git a/packages/nc-gui-v2/components/dlg/QuickImport.vue b/packages/nc-gui-v2/components/dlg/QuickImport.vue index 16e86c9969..bfb723632e 100644 --- a/packages/nc-gui-v2/components/dlg/QuickImport.vue +++ b/packages/nc-gui-v2/components/dlg/QuickImport.vue @@ -265,7 +265,8 @@ function getAdapter(name: string, val: any) { ref="templateEditorRef" :project-template="templateData" :import-data="importData" - :quick-import-type="importType" + :quick-import-type="props.importType" + @import="handleImport" /> diff --git a/packages/nc-gui-v2/components/template/Editor.vue b/packages/nc-gui-v2/components/template/Editor.vue index fa07e64a4c..157ad46a41 100644 --- a/packages/nc-gui-v2/components/template/Editor.vue +++ b/packages/nc-gui-v2/components/template/Editor.vue @@ -28,6 +28,8 @@ interface Option { const { quickImportType, projectTemplate, importData } = defineProps() +const emit = defineEmits(['import']) + const useForm = Form.useForm const { $api } = useNuxtApp() @@ -73,6 +75,9 @@ const { sqlUi, project, loadTables } = useProject() onMounted(() => { parseAndLoadTemplate() + nextTick(() => { + inputRefs.value[0]?.focus() + }) }) const validators = computed(() => @@ -282,7 +287,7 @@ defineExpose({