feat: 统一 api 组件的调用方法
This commit is contained in:
@@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
|
||||
label: '数据源',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const data = await getDataSourceConfigList();
|
||||
return data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
api: () => getDataSourceConfigList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
autoSelect: 'first',
|
||||
placeholder: '请选择数据源',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user