feat: 优化 dict

This commit is contained in:
xingyu4j
2025-06-20 18:32:05 +08:00
parent 7c3a2b7aa4
commit 9283d58ce9
11 changed files with 158 additions and 124 deletions

View File

@@ -139,8 +139,6 @@ const quickNavItems: WorkbenchQuickNavItem[] = [
];
const router = useRouter();
// 这是一个示例方法,实际项目中需要根据实际情况进行调整
// This is a sample method, adjust according to the actual project requirements
function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
if (nav.url?.startsWith('http')) {
openWindow(nav.url);

View File

@@ -1,12 +1,7 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import {
DICT_TYPE,
getDictOptions,
getIntDictOptions,
getRangePickerDefaultProps,
} from '#/utils';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -72,7 +67,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
placeholder: '请选择状态',
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS),
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
},
{

View File

@@ -1,12 +1,7 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import {
DICT_TYPE,
getDictOptions,
getIntDictOptions,
getRangePickerDefaultProps,
} from '#/utils';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -99,7 +94,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
placeholder: '请选择状态',
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS),
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
},
{

View File

@@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallSeckillConfigApi } from '#/api/mall/promotion/seckill/seckillConfig';
import { DICT_TYPE, getDictOptions, getIntDictOptions } from '#/utils';
import { DICT_TYPE, getDictOptions } from '#/utils';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -83,7 +83,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
placeholder: '请选择状态',
options: getIntDictOptions(DICT_TYPE.COMMON_STATUS),
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
},
];