From 9f6fef931a284acd73085847021b73437e29eb2c Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期五, 30 十月 2026 18:30:12 +0800
Subject: [PATCH] feat(ui): 全系统人员选择统一改为下拉模糊搜索
---
src/components/form-create/components/use-api-select.tsx | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/components/form-create/components/use-api-select.tsx b/src/components/form-create/components/use-api-select.tsx
index 5ff3d2a..0ea6a35 100644
--- a/src/components/form-create/components/use-api-select.tsx
+++ b/src/components/form-create/components/use-api-select.tsx
@@ -246,6 +246,19 @@
...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锛氬鍐欐姝ユ槸涓轰簡瑙e喅 multiple 灞炴�ч棶棰�
return (
@@ -255,6 +268,7 @@
mode="multiple"
onUpdate:value={onUpdateModelValue as any}
value={modelValue as any}
+ {...searchProps}
{...restAttrs}
// TODO @xingyu remote 瀵圭瓑瀹炵幇, 杩樻槸璇存病浣滅敤
// remote={props.remote}
@@ -276,6 +290,7 @@
loading={loading.value}
onUpdate:value={onUpdateModelValue as any}
value={modelValue as any}
+ {...searchProps}
{...restAttrs}
// TODO: @xingyu remote 瀵圭瓑瀹炵幇, 杩樻槸璇存病浣滅敤
// remote={props.remote}
--
Gitblit v1.9.3