feat: dataSourceConfigId

pull/19/head
xingyu 2023-05-24 14:56:18 +08:00
parent 35c8e137e0
commit f4e9d2f5e2
1 changed files with 10 additions and 4 deletions

View File

@ -131,10 +131,16 @@ export const importTableSearchFormSchema: FormSchema[] = [
label: '数据源', label: '数据源',
field: 'dataSourceConfigId', field: 'dataSourceConfigId',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: ({ formModel }) => {
api: () => getDataSourceConfigList(), return {
labelField: 'name', api: async () => {
valueField: 'id' const res = await getDataSourceConfigList()
formModel.dataSourceConfigId = res[0].id
return res
},
labelField: 'name',
valueField: 'id'
}
}, },
colProps: { span: 8 } colProps: { span: 8 }
}, },