fix:【antd】【ele】system 下角色分配,不支持多选的问题

This commit is contained in:
YunaiV
2025-10-07 20:53:31 +08:00
parent 5e5ae1195e
commit 2e91f912d5
3 changed files with 15 additions and 3 deletions

View File

@@ -79,11 +79,17 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
componentProps: {
placeholder: '请输入邮箱',
},
}, },
{ {
fieldName: 'mobile', fieldName: 'mobile',
label: '手机号码', label: '手机号码',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入手机号码',
},
}, },
{ {
fieldName: 'sex', fieldName: 'sex',

View File

@@ -178,7 +178,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
api: () => getSimpleTagList(), api: () => getSimpleTagList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', multiple: true,
placeholder: '请选择用户标签', placeholder: '请选择用户标签',
clearable: true, clearable: true,
}, },

View File

@@ -73,7 +73,7 @@ export function useFormSchema(): VbenFormSchema[] {
api: getSimplePostList, api: getSimplePostList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', multiple: true,
placeholder: '请选择岗位', placeholder: '请选择岗位',
}, },
}, },
@@ -82,11 +82,17 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(), rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
componentProps: {
placeholder: '请输入邮箱',
},
}, },
{ {
fieldName: 'mobile', fieldName: 'mobile',
label: '手机号码', label: '手机号码',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入手机号码',
},
}, },
{ {
fieldName: 'sex', fieldName: 'sex',
@@ -213,7 +219,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
api: getSimpleRoleList, api: getSimpleRoleList,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', multiple: true,
placeholder: '请选择角色', placeholder: '请选择角色',
}, },
}, },