feat:简化 ApiSelect 的 api 写法~

This commit is contained in:
YunaiV
2025-10-21 09:06:17 +08:00
parent 3b4c01cedf
commit ad00cf839c
103 changed files with 224 additions and 238 deletions

View File

@@ -72,7 +72,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleUserList(),
api: getSimpleUserList,
labelField: 'nickname',
valueField: 'id',
placeholder: '请选择负责人',

View File

@@ -187,7 +187,7 @@ export function useDataFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: (values) => {
return {
api: () => getSimpleDictTypeList(),
api: getSimpleDictTypeList,
placeholder: '请输入字典类型',
labelField: 'name',
valueField: 'type',

View File

@@ -59,7 +59,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleMailAccountList(),
api: getSimpleMailAccountList,
labelField: 'mail',
valueField: 'id',
allowClear: true,

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱账号',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleMailAccountList(),
api: getSimpleMailAccountList,
labelField: 'mail',
valueField: 'id',
placeholder: '请选择邮箱账号',
@@ -185,7 +185,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleMailAccountList(),
api: getSimpleMailAccountList,
labelField: 'mail',
valueField: 'id',
allowClear: true,

View File

@@ -195,7 +195,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
label: '接收人',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleUserList(),
api: getSimpleUserList,
labelField: 'nickname',
valueField: 'id',
placeholder: '请选择接收人',

View File

@@ -16,7 +16,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '操作人',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleUserList(),
api: getSimpleUserList,
labelField: 'nickname',
valueField: 'id',
allowClear: true,

View File

@@ -30,7 +30,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleSmsChannelList(),
api: getSimpleSmsChannelList,
labelField: 'signature',
valueField: 'id',
allowClear: true,

View File

@@ -52,7 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '短信渠道',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleSmsChannelList(),
api: getSimpleSmsChannelList,
labelField: 'signature',
valueField: 'id',
placeholder: '请选择短信渠道',
@@ -146,7 +146,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleSmsChannelList(),
api: getSimpleSmsChannelList,
labelField: 'signature',
valueField: 'id',
allowClear: true,

View File

@@ -35,7 +35,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '租户套餐',
component: 'ApiSelect',
componentProps: {
api: () => getTenantPackageList(),
api: getTenantPackageList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择租户套餐',

View File

@@ -67,7 +67,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '岗位',
component: 'ApiSelect',
componentProps: {
api: () => getSimplePostList(),
api: getSimplePostList,
labelField: 'name',
valueField: 'id',
mode: 'multiple',
@@ -213,7 +213,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
label: '角色',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleRoleList(),
api: getSimpleRoleList,
labelField: 'name',
valueField: 'id',
mode: 'multiple',