refactor: dict 抽离

This commit is contained in:
xingyu4j
2025-09-04 20:42:56 +08:00
parent 48ec3e15ab
commit b79bebab18
55 changed files with 142 additions and 86 deletions

View File

@@ -1,12 +1,11 @@
<script setup lang="ts">
import { computed } from 'vue';
import { getDictObj } from '@vben/hooks';
import { isValidColor, TinyColor } from '@vben/utils';
import { Tag } from 'ant-design-vue';
import { getDictObj } from '#/utils';
interface DictTagProps {
/**
* 字典类型

View File

@@ -4,6 +4,8 @@ import type { DictSelectProps } from '../typing';
import { computed, useAttrs } from 'vue';
import { getDictOptions } from '@vben/hooks';
import {
Checkbox,
CheckboxGroup,
@@ -13,8 +15,6 @@ import {
SelectOption,
} from 'ant-design-vue';
import { getDictOptions } from '#/utils';
defineOptions({ name: 'DictSelect' });
const props = withDefaults(defineProps<DictSelectProps>(), {

View File

@@ -1,12 +1,12 @@
<script setup lang="ts">
import type { OperateLogProps } from './typing';
import { DICT_TYPE } from '@vben/constants';
import { getDictLabel, getDictObj } from '@vben/hooks';
import { formatDateTime } from '@vben/utils';
import { Tag, Timeline } from 'ant-design-vue';
import { DICT_TYPE, getDictLabel, getDictObj } from '#/utils';
defineOptions({ name: 'OperateLogV2' });
withDefaults(defineProps<OperateLogProps>(), {

View File

@@ -1,6 +1,6 @@
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
import { DICT_TYPE } from '#/utils';
import { DICT_TYPE } from '@vben/constants';
/** 流程实例列表字段 */
export function useGridColumns(): VxeTableGridOptions['columns'] {

View File

@@ -1,6 +1,6 @@
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
import { DICT_TYPE } from '#/utils';
import { DICT_TYPE } from '@vben/constants';
/** 审批记录列表字段 */
export function useGridColumns(): VxeTableGridOptions['columns'] {