perf: code style

This commit is contained in:
xingyu4j
2025-05-29 01:51:38 +08:00
parent f6a5ca97a4
commit 5f6581b1c6
5 changed files with 75 additions and 101 deletions

View File

@@ -9,6 +9,7 @@ import { useAccess } from '@vben/access';
import { formatDateTime } from '@vben/utils';
import { getAreaTree } from '#/api/system/area';
import { getSimpleUserList } from '#/api/system/user';
import { DictTag } from '#/components/dict-tag';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
@@ -48,9 +49,13 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'ownerUserId',
label: '负责人',
component: 'Select',
component: 'ApiSelect',
componentProps: {
api: 'getSimpleUserList',
api: () => getSimpleUserList(),
fieldNames: {
label: 'nickname',
value: 'id',
},
},
rules: 'required',
},

View File

@@ -147,7 +147,7 @@ function onChangeSceneType(key: number | string) {
<FormModal @success="onRefresh" />
<Grid>
<template #toolbar-actions>
<template #top>
<Tabs class="border-none" @change="onChangeSceneType">
<Tabs.TabPane tab="我负责的" key="1" />
<Tabs.TabPane tab="我参与的" key="2" />

View File

@@ -29,9 +29,9 @@ const [Form, formApi] = useVbenForm({
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 120,
},
// 一共2列
wrapperClass: 'grid-cols-2',
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,