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,9 @@ import type { SystemMenuApi } from '#/api/system/menu';
import { h } from 'vue';
import { SystemMenuTypeEnum } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
import { handleTree, isHttpUrl, SystemMenuTypeEnum } from '@vben/utils';
import { handleTree, isHttpUrl } from '@vben/utils';
import { z } from '#/adapter/form';
import { getMenuList } from '#/api/system/menu';

View File

@@ -5,8 +5,8 @@ import type { SystemMenuApi } from '#/api/system/menu';
import { ref } from 'vue';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { SystemMenuTypeEnum } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
import { SystemMenuTypeEnum } from '@vben/utils';
import { message } from 'ant-design-vue';

View File

@@ -1,16 +1,11 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { UserTypeEnum } from '@vben/utils';
import { CommonStatusEnum, UserTypeEnum } from '@vben/constants';
import { z } from '#/adapter/form';
import { getSimpleUserList } from '#/api/system/user';
import {
CommonStatusEnum,
DICT_TYPE,
getDictOptions,
getRangePickerDefaultProps,
} from '#/utils';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [

View File

@@ -1,15 +1,10 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { SystemDataScopeEnum } from '@vben/utils';
import { CommonStatusEnum, SystemDataScopeEnum } from '@vben/constants';
import { z } from '#/adapter/form';
import {
CommonStatusEnum,
DICT_TYPE,
getDictOptions,
getRangePickerDefaultProps,
} from '#/utils';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {

View File

@@ -5,7 +5,8 @@ import type { SystemRoleApi } from '#/api/system/role';
import { ref } from 'vue';
import { useVbenModal, VbenTree } from '@vben/common-ui';
import { handleTree, SystemDataScopeEnum } from '@vben/utils';
import { SystemDataScopeEnum } from '@vben/constants';
import { handleTree } from '@vben/utils';
import { Checkbox, message } from 'ant-design-vue';

View File

@@ -7,7 +7,8 @@ import type { SystemRoleApi } from '#/api/system/role';
import { ref } from 'vue';
import { useVbenModal, VbenTree } from '@vben/common-ui';
import { handleTree, SystemMenuTypeEnum } from '@vben/utils';
import { SystemMenuTypeEnum } from '@vben/constants';
import { handleTree } from '@vben/utils';
import { Checkbox, message } from 'ant-design-vue';

View File

@@ -1,7 +1,7 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { SystemUserSocialTypeEnum } from '@vben/utils';
import { SystemUserSocialTypeEnum } from '@vben/constants';
import { z } from '#/adapter/form';
import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils';