refactor: 破坏性更新 dict 抽离

pull/209/head
xingyu4j 2025-09-05 12:24:58 +08:00
parent 6e19749ca3
commit c288098e10
8 changed files with 28 additions and 9 deletions

View File

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

View File

@ -3,8 +3,9 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemLoginLogApi } from '#/api/system/login-log';
import { useAccess } from '@vben/access';
import { DICT_TYPE } from '@vben/constants';
import { DICT_TYPE, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();

View File

@ -3,9 +3,11 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemMailLogApi } from '#/api/system/mail/log';
import { useAccess } from '@vben/access';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getSimpleMailAccountList } from '#/api/system/mail/account';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();

View File

@ -3,8 +3,10 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemNotifyMessageApi } from '#/api/system/notify/message';
import { useAccess } from '@vben/access';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();

View File

@ -5,10 +5,12 @@ import type { DescriptionItemSchema } from '#/components/description';
import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { formatDateTime } from '@vben/utils';
import { DictTag } from '#/components/dict-tag';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {

View File

@ -3,10 +3,15 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemRoleApi } from '#/api/system/role';
import { useAccess } from '@vben/access';
import { CommonStatusEnum, SystemDataScopeEnum } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
SystemDataScopeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();

View File

@ -3,9 +3,11 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemSmsLogApi } from '#/api/system/sms/log';
import { useAccess } from '@vben/access';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getSimpleSmsChannelList } from '#/api/system/sms/channel';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();

View File

@ -3,8 +3,10 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemSocialUserApi } from '#/api/system/social/user';
import { useAccess } from '@vben/access';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { getRangePickerDefaultProps } from '#/utils';
const { hasAccessByCodes } = useAccess();