refactor: 破坏性重构,将枚举类由 utils 提取到 @vben/utils

This commit is contained in:
xingyu4j
2025-09-03 16:08:40 +08:00
parent 25468bece5
commit e6f76c097d
143 changed files with 477 additions and 1343 deletions

View File

@@ -7,18 +7,13 @@ import type { SystemMenuApi } from '#/api/system/menu';
import { h } from 'vue';
import { IconifyIcon } from '@vben/icons';
import { handleTree, isHttpUrl } from '@vben/utils';
import { handleTree, isHttpUrl, SystemMenuTypeEnum } from '@vben/utils';
import { z } from '#/adapter/form';
import { getMenuList } from '#/api/system/menu';
import { $t } from '#/locales';
import { componentKeys } from '#/router/routes';
import {
CommonStatusEnum,
DICT_TYPE,
getDictOptions,
SystemMenuTypeEnum,
} from '#/utils';
import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {

View File

@@ -6,13 +6,13 @@ import { ref } from 'vue';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { IconifyIcon } from '@vben/icons';
import { SystemMenuTypeEnum } from '@vben/utils';
import { message } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteMenu, getMenuList } from '#/api/system/menu';
import { $t } from '#/locales';
import { SystemMenuTypeEnum } from '#/utils';
import { useGridColumns } from './data';
import Form from './modules/form.vue';

View File

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

View File

@@ -1,13 +1,14 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { SystemDataScopeEnum } from '@vben/utils';
import { z } from '#/adapter/form';
import {
CommonStatusEnum,
DICT_TYPE,
getDictOptions,
getRangePickerDefaultProps,
SystemDataScopeEnum,
} from '#/utils';
/** 新增/修改的表单 */

View File

@@ -5,7 +5,7 @@ import type { SystemRoleApi } from '#/api/system/role';
import { ref } from 'vue';
import { useVbenModal, VbenTree } from '@vben/common-ui';
import { handleTree } from '@vben/utils';
import { handleTree, SystemDataScopeEnum } from '@vben/utils';
import { Checkbox, message } from 'ant-design-vue';
@@ -14,7 +14,6 @@ import { getDeptList } from '#/api/system/dept';
import { assignRoleDataScope } from '#/api/system/permission';
import { getRole } from '#/api/system/role';
import { $t } from '#/locales';
import { SystemDataScopeEnum } from '#/utils';
import { useAssignDataPermissionFormSchema } from '../data';

View File

@@ -7,7 +7,7 @@ import type { SystemRoleApi } from '#/api/system/role';
import { ref } from 'vue';
import { useVbenModal, VbenTree } from '@vben/common-ui';
import { handleTree } from '@vben/utils';
import { handleTree, SystemMenuTypeEnum } from '@vben/utils';
import { Checkbox, message } from 'ant-design-vue';
@@ -15,7 +15,6 @@ import { useVbenForm } from '#/adapter/form';
import { getMenuList } from '#/api/system/menu';
import { assignRoleMenu, getRoleMenuList } from '#/api/system/permission';
import { $t } from '#/locales';
import { SystemMenuTypeEnum } from '#/utils';
import { useAssignMenuFormSchema } from '../data';

View File

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