diff --git a/frontend/src/components/business/ms-select/index.tsx b/frontend/src/components/business/ms-select/index.tsx index d961f8af4d..ec6aeb6de6 100644 --- a/frontend/src/components/business/ms-select/index.tsx +++ b/frontend/src/components/business/ms-select/index.tsx @@ -450,7 +450,9 @@ export default defineComponent( if (typeof props.optionLabelRender === 'function') { return label; } - const option = remoteOriginOptions.value.find((e) => e[props.labelKey || 'label'] === label); + const option = remoteOriginOptions.value.find( + (e) => e[props.labelKey || 'label'].toLowerCase() === label?.toLowerCase() + ); return option ? option[props.labelKey || 'label'] : props.optionNotExitsText || t('ms.select.optionsNotExits'); } diff --git a/frontend/src/hooks/useSelect.ts b/frontend/src/hooks/useSelect.ts index c9a46c28b5..364dab045d 100644 --- a/frontend/src/hooks/useSelect.ts +++ b/frontend/src/hooks/useSelect.ts @@ -36,7 +36,7 @@ export default function useSelect(config: UseSelectOption) { const innerViewWidth = selectViewInner.value?.getBoundingClientRect().width; let lastWidth = innerViewWidth - 60; // 60px 是“+N”的标签宽度+聚焦输入框的宽度 const childrenNodes = selectViewInner.value.children; - if (maxTagCount.value >= 1 && maxTagCount.value < config.selectVal.value.length) { + if (maxTagCount.value >= 1 && maxTagCount.value < config.selectVal.value?.length) { return; } for (let i = 0; i < childrenNodes.length; i++) { diff --git a/frontend/src/views/setting/organization/project/components/userDrawer.vue b/frontend/src/views/setting/organization/project/components/userDrawer.vue index 723fe654c9..17b16b414b 100644 --- a/frontend/src/views/setting/organization/project/components/userDrawer.vue +++ b/frontend/src/views/setting/organization/project/components/userDrawer.vue @@ -48,7 +48,6 @@ v-else v-model:model-value="record.userRoleList" :placeholder="t('system.user.createUserUserGroupPlaceholder')" - :options="userGroupOptions" :search-keys="['name']" :loading="record.selectUserGroupLoading" :disabled="record.selectUserGroupLoading" @@ -60,8 +59,11 @@ label-key="name" class="w-full max-w-[300px]" allow-clear - multiple - at-least-one + v-bind="{ + options: userGroupOptions, + multiple: true, + }" + :at-least-one="true" :object-value="true" @popup-visible-change="(value) => handleUserGroupChange(value, record)" > diff --git a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue index 8268aced59..3ecd508579 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue @@ -49,7 +49,6 @@ v-else v-model:model-value="record.userRoleList" :placeholder="t('system.user.createUserUserGroupPlaceholder')" - :options="userGroupOptions" :search-keys="['name']" :loading="record.selectUserGroupLoading" :disabled="record.selectUserGroupLoading" @@ -61,8 +60,11 @@ label-key="name" class="w-full max-w-[300px]" allow-clear - multiple - at-least-one + v-bind="{ + options: userGroupOptions, + multiple: true, + }" + :at-least-one="true" :object-value="true" @popup-visible-change="(value) => handleUserGroupChange(value, record)" >