From 9e62775e06c03e1422d047d608ea8c4c508497a7 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 21 Jul 2022 23:28:39 +0800 Subject: [PATCH] refactor(gui-v2): DlgFileImport --- .../components/dashboard/TabView.vue | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/nc-gui-v2/components/dashboard/TabView.vue b/packages/nc-gui-v2/components/dashboard/TabView.vue index 425e3f8451..54695fa0de 100644 --- a/packages/nc-gui-v2/components/dashboard/TabView.vue +++ b/packages/nc-gui-v2/components/dashboard/TabView.vue @@ -14,9 +14,9 @@ const { tabs, activeTab, closeTab } = useTabs() // const { isUIAllowed } = useUIPermission() const isUIAllowed = (x: string) => true const tableCreateDialog = ref(false) -const excelCsvDialog = ref(false) -const jsonImportDialog = ref(false) const airtableImportDialog = ref(false) +const fileImportDialog = ref(false) +const importType = ref('') const currentMenu = ref(['addORImport']) const onEdit = (targetKey: number, action: string) => { @@ -73,7 +73,10 @@ const onEdit = (targetKey: number, action: string) => { v-if="isUIAllowed('csvImport')" key="quick-import-csv" v-t="['a:actions:import-csv']" - @click="excelCsvDialog = true" + @click=" + fileImportDialog = true + importType = 'csv' + " > @@ -85,7 +88,10 @@ const onEdit = (targetKey: number, action: string) => { v-if="isUIAllowed('jsonImport')" key="quick-import-json" v-t="['a:actions:import-json']" - @click="jsonImportDialog = true" + @click=" + fileImportDialog = true + importType = 'json' + " > @@ -97,7 +103,10 @@ const onEdit = (targetKey: number, action: string) => { v-if="isUIAllowed('excelImport')" key="quick-import-excel" v-t="['a:actions:import-excel']" - @click="excelCsvDialog = true" + @click=" + fileImportDialog = true + importType = 'excel' + " > @@ -120,8 +129,7 @@ const onEdit = (targetKey: number, action: string) => { - - + @@ -142,4 +150,4 @@ const onEdit = (targetKey: number, action: string) => { padding: 0px 46px 0px 16px; margin: 0px; } - + \ No newline at end of file