refactor: 将枚举和常量从utils移动到constants

This commit is contained in:
xingyu4j
2025-09-04 18:19:49 +08:00
parent d7d445617f
commit 37fba1474e
144 changed files with 255 additions and 245 deletions

View File

@@ -6,8 +6,8 @@ import type { AiImageApi } from '#/api/ai/image';
import { onMounted, ref, toRefs, watch } from 'vue';
import { confirm } from '@vben/common-ui';
import { AiImageStatusEnum } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
import { AiImageStatusEnum } from '@vben/utils';
import { Button, Card, Image, message } from 'ant-design-vue';

View File

@@ -6,11 +6,11 @@ import { ref, toRefs, watch } from 'vue';
import {
AiPlatformEnum,
Dall3StyleList,
formatDate,
StableDiffusionClipGuidancePresets,
StableDiffusionSamplers,
StableDiffusionStylePresets,
} from '@vben/utils';
} from '@vben/constants';
import { formatDate } from '@vben/utils';
import { Image } from 'ant-design-vue';

View File

@@ -5,7 +5,8 @@ import { onMounted, onUnmounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { confirm, useVbenDrawer } from '@vben/common-ui';
import { AiImageStatusEnum, downloadFileFromImageUrl } from '@vben/utils';
import { AiImageStatusEnum } from '@vben/constants';
import { downloadFileFromImageUrl } from '@vben/utils';
import { useDebounceFn } from '@vueuse/core';
import { Button, Card, message, Pagination } from 'ant-design-vue';

View File

@@ -6,7 +6,11 @@ import type { AiModelModelApi } from '#/api/ai/model/model';
import { ref, watch } from 'vue';
import { confirm } from '@vben/common-ui';
import { AiPlatformEnum, ImageHotWords, OtherPlatformEnum } from '@vben/utils';
import {
AiPlatformEnum,
ImageHotWords,
OtherPlatformEnum,
} from '@vben/constants';
import { Button, InputNumber, Select, Space, Textarea } from 'ant-design-vue';

View File

@@ -1,6 +1,6 @@
<!-- dall3 -->
<script setup lang="ts">
import type { ImageModel, ImageSize } from '@vben/utils';
import type { ImageModel, ImageSize } from '@vben/constants';
import type { AiImageApi } from '#/api/ai/image';
import type { AiModelModelApi } from '#/api/ai/model/model';
@@ -14,7 +14,7 @@ import {
Dall3SizeList,
Dall3StyleList,
ImageHotWords,
} from '@vben/utils';
} from '@vben/constants';
import { Button, Image, message, Space, Textarea } from 'ant-design-vue';

View File

@@ -1,6 +1,6 @@
<!-- dall3 -->
<script setup lang="ts">
import type { ImageModel, ImageSize } from '@vben/utils';
import type { ImageModel, ImageSize } from '@vben/constants';
import type { AiImageApi } from '#/api/ai/image';
import type { AiModelModelApi } from '#/api/ai/model/model';
@@ -15,7 +15,7 @@ import {
MidjourneySizeList,
MidjourneyVersions,
NijiVersionList,
} from '@vben/utils';
} from '@vben/constants';
import {
Button,

View File

@@ -12,7 +12,7 @@ import {
StableDiffusionClipGuidancePresets,
StableDiffusionSamplers,
StableDiffusionStylePresets,
} from '@vben/utils';
} from '@vben/constants';
import {
Button,

View File

@@ -5,7 +5,7 @@ import type { AiModelModelApi } from '#/api/ai/model/model';
import { nextTick, onMounted, ref } from 'vue';
import { Page } from '@vben/common-ui';
import { AiModelTypeEnum, AiPlatformEnum } from '@vben/utils';
import { AiModelTypeEnum, AiPlatformEnum } from '@vben/constants';
import { Segmented } from 'ant-design-vue';

View File

@@ -6,7 +6,7 @@ import type { SystemUserApi } from '#/api/system/user';
import { onMounted, ref } from 'vue';
import { confirm, DocAlert, Page } from '@vben/common-ui';
import { AiImageStatusEnum } from '@vben/utils';
import { AiImageStatusEnum } from '@vben/constants';
import { Image, message, Switch } from 'ant-design-vue';