| | |
| | | ...restAttrs |
| | | } = attrs; |
| | | |
| | | // 人员选择器(UserSelect)默认开启模糊搜索:支持按姓名输入过滤 |
| | | const searchProps = |
| | | option.name === 'UserSelect' |
| | | ? { |
| | | showSearch: true, |
| | | optionFilterProp: 'label', |
| | | filterOption: (input: string, opt: any) => |
| | | String(opt?.label ?? '') |
| | | .toLowerCase() |
| | | .includes(String(input).toLowerCase()), |
| | | } |
| | | : {}; |
| | | |
| | | if (props.multiple) { |
| | | // fix:多写此步是为了解决 multiple 属性问题 |
| | | return ( |
| | |
| | | mode="multiple" |
| | | onUpdate:value={onUpdateModelValue as any} |
| | | value={modelValue as any} |
| | | {...searchProps} |
| | | {...restAttrs} |
| | | // TODO @xingyu remote 对等实现, 还是说没作用 |
| | | // remote={props.remote} |
| | |
| | | loading={loading.value} |
| | | onUpdate:value={onUpdateModelValue as any} |
| | | value={modelValue as any} |
| | | {...searchProps} |
| | | {...restAttrs} |
| | | // TODO: @xingyu remote 对等实现, 还是说没作用 |
| | | // remote={props.remote} |