fix(view): 代码生成模块 数据源

closed #I6YAIF
pull/5/MERGE
xingyuv 2023-04-24 11:02:26 +08:00
parent c2cd770fec
commit 4fc394fc8d
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import { createCodegenList, getSchemaTableList } from '@/api/infra/codegen'
const emit = defineEmits(['success', 'register'])
const [registerTable, { getSelectRowKeys }] = useTable({
const [registerTable, { getSelectRowKeys, getForm }] = useTable({
api: getSchemaTableList,
columns: importTableColumns,
formConfig: {
@ -32,8 +32,8 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async () =>
async function handleSubmit() {
const datas = await getSelectRowKeys()
console.info(datas)
await createCodegenList({ dataSourceConfigId: 0, tableNames: datas })
const form = await getForm()
await createCodegenList({ dataSourceConfigId: form.getFieldsValue().dataSourceConfigId, tableNames: datas })
closeModal()
emit('success')
}