From f3b83990ad1aa8e07611b912ef2c941edc0e6c41 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Tue, 8 Jul 2025 17:54:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20formCreate=20=E7=BB=84=E4=BB=B6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=80=89=E6=8B=A9=E5=99=A8=EF=BC=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-create/components/use-api-select.tsx | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/components/form-create/components/use-api-select.tsx b/apps/web-antd/src/components/form-create/components/use-api-select.tsx index 491fdba32..74f33fe0f 100644 --- a/apps/web-antd/src/components/form-create/components/use-api-select.tsx +++ b/apps/web-antd/src/components/form-create/components/use-api-select.tsx @@ -186,6 +186,12 @@ export const useApiSelect = (option: ApiSelectProps) => { }); const buildSelect = () => { + const { + modelValue, + 'onUpdate:modelValue': onUpdateModelValue, + ...restAttrs + } = attrs; + if (props.multiple) { // fix:多写此步是为了解决 multiple 属性问题 return ( @@ -193,7 +199,9 @@ export const useApiSelect = (option: ApiSelectProps) => { class="w-full" loading={loading.value} mode="multiple" - {...attrs} + onUpdate:value={onUpdateModelValue as any} + value={modelValue as any} + {...restAttrs} // TODO: remote 对等实现 // remote={props.remote} {...(props.remote && { remoteMethod })} @@ -212,7 +220,9 @@ export const useApiSelect = (option: ApiSelectProps) => {