refactor: 将枚举和常量从utils移动到constants
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
|
||||
import { AiModelTypeEnum } from '@vben/utils';
|
||||
import { AiModelTypeEnum } from '@vben/constants';
|
||||
|
||||
import { getModelSimpleList } from '#/api/ai/model/model';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
StableDiffusionClipGuidancePresets,
|
||||
StableDiffusionSamplers,
|
||||
StableDiffusionStylePresets,
|
||||
} from '@vben/utils';
|
||||
} from '@vben/constants';
|
||||
|
||||
import {
|
||||
Button,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { AiModelTypeEnum } from '@vben/utils';
|
||||
import { AiModelTypeEnum, CommonStatusEnum, DICT_TYPE } from '@vben/constants';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getModelSimpleList } from '#/api/ai/model/model';
|
||||
import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils';
|
||||
import { getDictOptions } from '#/utils';
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { AiModelTypeEnum } from '@vben/utils';
|
||||
import { AiModelTypeEnum, CommonStatusEnum, DICT_TYPE } from '@vben/constants';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getModelSimpleList } from '#/api/ai/model/model';
|
||||
import {
|
||||
CommonStatusEnum,
|
||||
DICT_TYPE,
|
||||
getDictOptions,
|
||||
getRangePickerDefaultProps,
|
||||
} from '#/utils';
|
||||
import { getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useRoute } from 'vue-router';
|
||||
|
||||
import { useAccess } from '@vben/access';
|
||||
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { CommonStatusEnum } from '@vben/utils';
|
||||
import { CommonStatusEnum } from '@vben/constants';
|
||||
|
||||
import { message, Switch } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { AiMindmapApi } from '#/api/ai/mindmap';
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
|
||||
import { alert, Page } from '@vben/common-ui';
|
||||
import { MindMapContentExample } from '@vben/utils';
|
||||
import { MindMapContentExample } from '@vben/constants';
|
||||
|
||||
import { generateMindMap } from '#/api/ai/mindmap';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
import { MindMapContentExample } from '@vben/utils';
|
||||
import { MindMapContentExample } from '@vben/constants';
|
||||
|
||||
import { Button, Textarea } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { AiModelTypeEnum } from '@vben/utils';
|
||||
import { AiModelTypeEnum } from '@vben/constants';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getSimpleKnowledgeList } from '#/api/ai/knowledge/knowledge';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { AiModelTypeEnum } from '@vben/utils';
|
||||
import { AiModelTypeEnum } from '@vben/constants';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getApiKeySimpleList } from '#/api/ai/model/apiKey';
|
||||
|
||||
@@ -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 { AiMusicStatusEnum } from '@vben/utils';
|
||||
import { AiMusicStatusEnum } from '@vben/constants';
|
||||
|
||||
import { Button, message, Switch } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import { onBeforeUnmount, onMounted, provide, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { confirm, Page } from '@vben/common-ui';
|
||||
import { AiModelTypeEnum, CommonStatusEnum } from '@vben/constants';
|
||||
import { useTabs } from '@vben/hooks';
|
||||
import { ArrowLeft } from '@vben/icons';
|
||||
import { AiModelTypeEnum, CommonStatusEnum } from '@vben/utils';
|
||||
|
||||
import { Button, Card, message } from 'ant-design-vue';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { AiWriteApi } from '#/api/ai/write';
|
||||
import { nextTick, ref } from 'vue';
|
||||
|
||||
import { alert, Page } from '@vben/common-ui';
|
||||
import { WriteExample } from '@vben/utils';
|
||||
import { WriteExample } from '@vben/constants';
|
||||
|
||||
import { writeStream } from '#/api/ai/write';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user