Browse Source

feat(gui-v2): add importOnly

pull/3051/head
Wing-Kam Wong 2 years ago
parent
commit
c2fd782c36
  1. 4
      packages/nc-gui-v2/components/dlg/QuickImport.vue
  2. 2
      packages/nc-gui-v2/pages/nc/[projectId]/index/index.vue

4
packages/nc-gui-v2/components/dlg/QuickImport.vue

@ -16,9 +16,10 @@ import { useProject } from '#imports'
interface Props { interface Props {
modelValue: boolean modelValue: boolean
importType: 'csv' | 'json' | 'excel' importType: 'csv' | 'json' | 'excel'
importOnly: boolean
} }
const { importType, ...rest } = defineProps<Props>() const { importType, importOnly, ...rest } = defineProps<Props>()
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
@ -265,6 +266,7 @@ function getAdapter(name: string, val: any) {
ref="templateEditorRef" ref="templateEditorRef"
:project-template="templateData" :project-template="templateData"
:import-data="importData" :import-data="importData"
:import-only="importOnly"
:quick-import-type="importType" :quick-import-type="importType"
@import="handleImport" @import="handleImport"
/> />

2
packages/nc-gui-v2/pages/nc/[projectId]/index/index.vue

@ -134,7 +134,7 @@ function openQuickImportDialog(type: string) {
</div> </div>
<DlgTableCreate v-if="tableCreateDialog" v-model="tableCreateDialog" /> <DlgTableCreate v-if="tableCreateDialog" v-model="tableCreateDialog" />
<DlgQuickImport v-if="quickImportDialog" v-model="quickImportDialog" :import-type="importType" /> <DlgQuickImport v-if="quickImportDialog" v-model="quickImportDialog" :import-type="importType" :import-only="false" />
<DlgAirtableImport v-if="airtableImportDialog" v-model="airtableImportDialog" /> <DlgAirtableImport v-if="airtableImportDialog" v-model="airtableImportDialog" />
</div> </div>

Loading…
Cancel
Save