This commit is contained in:
shanhexi
2023-12-13 15:28:50 +08:00
parent 88fd4d8a7b
commit 4377e893e0
2 changed files with 6 additions and 3 deletions

View File

@@ -105,6 +105,9 @@ const SelectBoundInfo = memo((props: IProps) => {
// 获取数据库列表
const getDatabaseList = () => {
if(boundInfo.dataSourceId === undefined || boundInfo.dataSourceId === null){
return
}
connectionService
.getDatabaseList({
dataSourceId: boundInfo.dataSourceId,
@@ -131,8 +134,8 @@ const SelectBoundInfo = memo((props: IProps) => {
// 获取schema列表
const getSchemaList = () => {
if (boundInfo.databaseName === null || boundInfo.databaseName === undefined) {
return;
if(boundInfo.dataSourceId === undefined || boundInfo.dataSourceId === null){
return
}
connectionService
.getSchemaList({

View File

@@ -59,7 +59,7 @@ const getDatabaseList = createRequest<{ dataSourceId: number; refresh?: boolean
method: 'get',
});
const getSchemaList = createRequest<{ dataSourceId: number; databaseName: string; refresh?: boolean }, any>(
const getSchemaList = createRequest<{ dataSourceId: number; databaseName?: string; refresh?: boolean }, any>(
'/api/rdb/schema/list',
{ method: 'get' },
);