feat(codegen): 代码生成支持本地写入和代码优化

This commit is contained in:
Ray.Hao
2025-08-21 18:28:38 +08:00
parent 72b89e2894
commit 07206576a8
61 changed files with 1045 additions and 1087 deletions

View File

@@ -1,4 +1,4 @@
import UserAPI, { type UserForm } from "@/api/system/user.api";
import UserAPI, { type UserForm } from "@/api/system/user-api";
import type { IModalConfig } from "@/components/CURD/types";
import { deptArr, roleArr } from "./options";

View File

@@ -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-api";
import RoleAPI from "@/api/system/role-api";
import type { UserPageQuery } from "@/api/system/user-api";
import type { IContentConfig } from "@/components/CURD/types";
const contentConfig: IContentConfig<UserPageQuery> = {

View File

@@ -1,4 +1,4 @@
import UserAPI, { type UserForm } from "@/api/system/user.api";
import UserAPI, { type UserForm } from "@/api/system/user-api";
import type { IModalConfig } from "@/components/CURD/types";
import { DeviceEnum } from "@/enums/settings/device.enum";
import { useAppStore } from "@/store";

View File

@@ -1,6 +1,6 @@
/** 公共下载数据,减少重复请求次数 */
import DeptAPI from "@/api/system/dept.api";
import RoleAPI from "@/api/system/role.api";
import DeptAPI from "@/api/system/dept-api";
import RoleAPI from "@/api/system/role-api";
interface OptionType {
label: string;

View File

@@ -1,4 +1,4 @@
import type { UserForm } from "@/api/system/user.api";
import type { UserForm } from "@/api/system/user-api";
import type { IModalConfig } from "@/components/CURD/types";
import { deptArr } from "../config/options";

View File

@@ -113,7 +113,7 @@
</template>
<script setup lang="ts">
import UserAPI from "@/api/system/user.api";
import UserAPI from "@/api/system/user-api";
import type { IObject, IOperateData, PageModalInstance } from "@/components/CURD/types";
import usePage from "@/components/CURD/usePage";
import addModalConfig from "./config/add";

View File

@@ -139,9 +139,9 @@
</template>
<script setup lang="ts">
import { useDictStoreHook } from "@/store/modules/dict.store";
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-api";
import { useDictSync, DictMessage } from "@/composables/useDictSync";
// 性别字典编码

View File

@@ -21,7 +21,7 @@
</div>
</template>
<script setup lang="ts">
import FileAPI from "@/api/file.api";
import FileAPI from "@/api/file-api";
const imgUrl = ref("");
const canvas = ref();

View File

@@ -1,4 +1,4 @@
import UserAPI from "@/api/system/user.api";
import UserAPI from "@/api/system/user-api";
import type { ISelectConfig } from "@/components/TableSelect/index.vue";
const selectConfig: ISelectConfig = {

View File

@@ -98,7 +98,7 @@
<script setup lang="ts">
import { useStomp } from "@/composables/useStomp";
import { useUserStoreHook } from "@/store/modules/user.store";
import { useUserStoreHook } from "@/store/modules/user-store";
const userStore = useUserStoreHook();
// 用于手动调整 WebSocket 地址