refactor: ♻️ 重构API为静态方法实现模块化管理,并将types.ts重命名为model.ts用于存放接口模型定义
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { deleteUsers, exportUser, getUserPage } from "@/api/user";
|
||||
import type { UserQuery } from "@/api/user/types";
|
||||
import UserAPI from "@/api/user";
|
||||
import type { UserQuery } from "@/api/user/model";
|
||||
import type { IContentConfig } from "@/components/PageContent/index.vue";
|
||||
|
||||
const contentConfig: IContentConfig<UserQuery> = {
|
||||
@@ -15,10 +15,10 @@ const contentConfig: IContentConfig<UserQuery> = {
|
||||
params.endTime = createAt[1];
|
||||
delete params.createAt;
|
||||
}
|
||||
return getUserPage(params);
|
||||
return UserAPI.getPage(params);
|
||||
},
|
||||
deleteAction: deleteUsers,
|
||||
exportAction: exportUser,
|
||||
deleteAction: UserAPI.deleteByIds,
|
||||
exportAction: UserAPI.export,
|
||||
pk: "id",
|
||||
toolbar: [
|
||||
"refresh",
|
||||
|
||||
Reference in New Issue
Block a user