Commit 9bac6f195c20dc9c4940c924dcf56e1d33bff68a
1 parent
6a601e83
fix: DEFECT-1537 新增租户的时候,输入角色进行筛选时没有效果
Showing
1 changed file
with
14 additions
and
8 deletions
@@ -110,14 +110,20 @@ export const tenantFormSchema: FormSchema[] = [ | @@ -110,14 +110,20 @@ export const tenantFormSchema: FormSchema[] = [ | ||
110 | label: '租户角色', | 110 | label: '租户角色', |
111 | component: 'ApiSelect', | 111 | component: 'ApiSelect', |
112 | required: true, | 112 | required: true, |
113 | - componentProps: { | ||
114 | - mode: 'multiple', | ||
115 | - api: getAllRoleList, | ||
116 | - params: { | ||
117 | - roleType: RoleEnum.TENANT_ADMIN, | ||
118 | - }, | ||
119 | - labelField: 'name', | ||
120 | - valueField: 'id', | 113 | + componentProps: () => { |
114 | + return { | ||
115 | + api: async () => { | ||
116 | + const res = await getAllRoleList({ roleType: RoleEnum.TENANT_ADMIN }); | ||
117 | + return res; | ||
118 | + }, | ||
119 | + mode: 'multiple', | ||
120 | + showSearch: true, | ||
121 | + labelField: 'name', | ||
122 | + valueField: 'id', | ||
123 | + filterOption: (inputValue: string, options: Record<'label' | 'value', string>) => { | ||
124 | + return options.label.toLowerCase().includes(inputValue.toLowerCase()); | ||
125 | + }, | ||
126 | + }; | ||
121 | }, | 127 | }, |
122 | }, | 128 | }, |
123 | { | 129 | { |