diff --git a/ui/src/api/type/role.ts b/ui/src/api/type/role.ts index 0c7eb9810..90f88e519 100644 --- a/ui/src/api/type/role.ts +++ b/ui/src/api/type/role.ts @@ -62,7 +62,7 @@ interface FormItemModel { rules?: Arrayable, hidden?: (e: any) => boolean, selectProps?: { - options?: { label: string, value: string }[] + options?: { label: string, value: string, disabledFunction?: (e: any) => boolean }[] placeholder?: string multiple?: boolean clearableFunction?: (e: any) => boolean diff --git a/ui/src/views/system/role/component/MemberFormContent.vue b/ui/src/views/system/role/component/MemberFormContent.vue index b0301e5cc..4ad2e0899 100644 --- a/ui/src/views/system/role/component/MemberFormContent.vue +++ b/ui/src/views/system/role/component/MemberFormContent.vue @@ -8,7 +8,7 @@ :placeholder="model.selectProps?.placeholder ?? $t('common.selectPlaceholder')" :clearable="model.selectProps?.clearableFunction?model.selectProps?.clearableFunction?.(element): true" filterable multiple style="width: 100%" collapse-tags collapse-tags-tooltip v-bind="model.selectProps"> + :value="opt.value" :disabled="opt.disabledFunction?.(element)" /> diff --git a/ui/src/views/system/user-manage/component/UserDrawer.vue b/ui/src/views/system/user-manage/component/UserDrawer.vue index a9dc5b946..9343b2dc5 100644 --- a/ui/src/views/system/user-manage/component/UserDrawer.vue +++ b/ui/src/views/system/user-manage/component/UserDrawer.vue @@ -69,7 +69,7 @@