refactor: type/注释优化 去除大量any

This commit is contained in:
dap
2025-01-10 14:02:21 +08:00
parent 6e3b468303
commit 9f6bee86f0
81 changed files with 710 additions and 367 deletions

View File

@@ -1,6 +1,6 @@
import type { GenInfo } from './model';
import type { ID, IDS } from '#/api/common';
import type { ID, IDS, PageQuery } from '#/api/common';
import { ContentTypeEnum } from '#/api/helper';
import { requestClient } from '#/api/request';
@@ -19,7 +19,7 @@ enum Api {
syncDb = '/tool/gen/synchDb',
}
// 查询代码生成列表
export function generatedList(params: any) {
export function generatedList(params?: PageQuery) {
return requestClient.get(Api.generatedList, { params });
}
@@ -29,7 +29,7 @@ export function genInfo(tableId: ID) {
}
// 查询数据库列表
export function readyToGenList(params: any) {
export function readyToGenList(params?: PageQuery) {
return requestClient.get(Api.readyToGenList, { params });
}
@@ -63,6 +63,7 @@ export function editSave(data: any) {
export function genRemove(tableIds: IDS) {
return requestClient.deleteWithMsg(`${Api.root}/${tableIds}`);
}
// 预览代码
export function previewCode(tableId: ID) {
return requestClient.get<{ [key: string]: string }>(