refactor: 重命名 API 文件并更新引用路径
- 重命名 13 个 API 文件,去掉 -api 后缀 * src/api/auth-api.ts auth.ts * src/api/codegen-api.ts codegen.ts * src/api/file-api.ts file.ts * src/api/system/*.ts (9个文件) - 批量更新 50+ 处 API 引用路径 - 修复 websocket 和枚举导入路径 - 确保零编码问题(使用 UTF-8 编码)
This commit is contained in:
@@ -68,10 +68,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import DeptAPI from "@/api/system/dept-api";
|
||||
import RoleAPI from "@/api/system/role-api";
|
||||
import type { UserForm, UserPageQuery } from "@/api/system/user-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import DeptAPI from "@/api/system/dept";
|
||||
import RoleAPI from "@/api/system/role";
|
||||
import type { UserForm, UserPageQuery } from "@/api/system/user";
|
||||
import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
|
||||
import { DeviceEnum } from "@/enums/settings/device-enum";
|
||||
import { useAppStore } from "@/store";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import UserAPI, { type UserForm } from "@/api/system/user-api";
|
||||
import UserAPI, { type UserForm } from "@/api/system/user";
|
||||
import type { IModalConfig } from "@/components/CURD/types";
|
||||
import { deptArr, roleArr } from "./options";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import RoleAPI from "@/api/system/role-api";
|
||||
import type { UserPageQuery } from "@/api/system/user-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import RoleAPI from "@/api/system/role";
|
||||
import type { UserPageQuery } from "@/api/system/user";
|
||||
import type { IContentConfig } from "@/components/CURD/types";
|
||||
|
||||
const contentConfig: IContentConfig<UserPageQuery> = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import UserAPI, { type UserForm } from "@/api/system/user-api";
|
||||
import UserAPI, { type UserForm } from "@/api/system/user";
|
||||
import type { IModalConfig } from "@/components/CURD/types";
|
||||
import { DeviceEnum } from "@/enums/settings/device-enum";
|
||||
import { useAppStore } from "@/store";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** 公共下载数据,减少重复请求次数 */
|
||||
import DeptAPI from "@/api/system/dept-api";
|
||||
import RoleAPI from "@/api/system/role-api";
|
||||
import DeptAPI from "@/api/system/dept";
|
||||
import RoleAPI from "@/api/system/role";
|
||||
|
||||
interface OptionType {
|
||||
label: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UserForm } from "@/api/system/user-api";
|
||||
import type { UserForm } from "@/api/system/user";
|
||||
import type { IModalConfig } from "@/components/CURD/types";
|
||||
import { deptArr } from "../config/options";
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import type { IObject, IOperateData, PageModalInstance } from "@/components/CURD/types";
|
||||
import usePage from "@/components/CURD/usePage";
|
||||
import addModalConfig from "./config/add";
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useDictStoreHook } from "@/store/modules/dict-store";
|
||||
import { useDateFormat } from "@vueuse/core";
|
||||
import DictAPI, { DictItemForm } from "@/api/system/dict-api";
|
||||
import DictAPI, { DictItemForm } from "@/api/system/dict";
|
||||
import { useDictSync, DictMessage } from "@/composables";
|
||||
|
||||
// 性别字典编码
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import FileAPI from "@/api/file-api";
|
||||
import FileAPI from "@/api/file";
|
||||
|
||||
const imgUrl = ref("");
|
||||
const canvas = ref();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import type { ISelectConfig } from "@/components/TableSelect/index.vue";
|
||||
|
||||
const selectConfig: ISelectConfig = {
|
||||
|
||||
Reference in New Issue
Block a user