From e9d017cba96cbbadbcc1f4c3fdebca4fb5186972 Mon Sep 17 00:00:00 2001 From: Semjon Geist Date: Sun, 19 Feb 2023 18:52:26 +0100 Subject: [PATCH] add feature upload xlsx / json in existing table --- .../nc-gui/components/dlg/QuickImport.vue | 7 ++- .../smartsheet/toolbar/ViewActions.vue | 49 +++++++++++++------ .../nc-gui/components/template/Editor.vue | 16 +++++- 3 files changed, 53 insertions(+), 19 deletions(-) diff --git a/packages/nc-gui/components/dlg/QuickImport.vue b/packages/nc-gui/components/dlg/QuickImport.vue index 8f3f1bad79..b98edd7c79 100644 --- a/packages/nc-gui/components/dlg/QuickImport.vue +++ b/packages/nc-gui/components/dlg/QuickImport.vue @@ -61,7 +61,7 @@ const isParsingData = ref(false) const useForm = Form.useForm -const importState = reactive({ +const defaultImportState = { fileList: [] as importFileList | streamImportFileList, url: '', jsonEditor: {}, @@ -72,7 +72,8 @@ const importState = reactive({ firstRowAsHeaders: true, shouldImportData: true, }, -}) +} +const importState = reactive(defaultImportState) const isImportTypeJson = computed(() => importType === 'json') @@ -176,6 +177,8 @@ async function handleImport() { return message.error(await extractSdkResponseErrorMsg(e)) } finally { importLoading.value = false + templateEditorModal.value = false + Object.assign(importState, defaultImportState) } dialogShow.value = false } diff --git a/packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue b/packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue index f955ff7075..ac56024750 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue @@ -1,4 +1,5 @@