| | |
| | | } = useNodeForm(currentNode.value.type); |
| | | const configForm = tempConfigForm as Ref<UserTaskFormType>; |
| | | |
| | | /** |
| | | * 用户下拉的搜索过滤。 |
| | | * |
| | | * 默认的 Select 搜索只在 options 已渲染时按 label 过滤,这里显式实现, |
| | | * 保证输入昵称(含中文)能正确匹配,且不受大小写影响。 |
| | | */ |
| | | function filterUserOption(input: string, option: any) { |
| | | const keyword = (input || '').trim().toLowerCase(); |
| | | if (!keyword) { |
| | | return true; |
| | | } |
| | | const label = String(option?.label ?? option?.nickname ?? ''); |
| | | return label.toLowerCase().includes(keyword); |
| | | } |
| | | |
| | | // 改变审批人设置策略 |
| | | function changeCandidateStrategy() { |
| | | configForm.value.userIds = []; |
| | |
| | | v-model:value="configForm.userIds" |
| | | clearable |
| | | mode="multiple" |
| | | show-search |
| | | option-filter-prop="label" |
| | | :filter-option="filterUserOption" |
| | | placeholder="请输入用户名称搜索" |
| | | > |
| | | <SelectOption |
| | | v-for="item in userOptions" |