From 52da9b663b59b3bc873736852d2cc036f74ac98c Mon Sep 17 00:00:00 2001 From: RUNZE LU <36724300+lurunze1226@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:01:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Select=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A4=9A=E9=80=89=E4=B8=94=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?menuTpl=E6=97=B6=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9=20Close:?= =?UTF-8?q?=20#9005=20(#9023)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../amis-ui/src/components/SelectMobile.tsx | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/amis-ui/src/components/SelectMobile.tsx b/packages/amis-ui/src/components/SelectMobile.tsx index 8f6b72cd0..0bb5373e5 100644 --- a/packages/amis-ui/src/components/SelectMobile.tsx +++ b/packages/amis-ui/src/components/SelectMobile.tsx @@ -345,15 +345,26 @@ export default class SelectMobile extends React.Component { > {renderMenu ? ( multiple ? ( - renderMenu(item, { - multiple, - checkAll, - checked, - onChange: () => this.handleChange(item), - inputValue: inputValue || '', - searchable, - index - }) + <> +
!item.disabled && this.handleChange([item])} + > + {renderMenu(item, { + multiple, + checkAll, + checked, + onChange: () => this.handleChange(item), + inputValue: inputValue || '', + searchable, + index + })} +
+ {checked ? ( + + ) : null} + ) : ( renderMenu(item, { multiple,