From d5b7c773b04d4818494d6b72e76366304013e561 Mon Sep 17 00:00:00 2001 From: allenve Date: Mon, 2 Dec 2024 19:15:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=BA=E5=91=98=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=94=AF=E6=8C=81=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/UserSelect.tsx | 3 +++ packages/amis-ui/src/components/UserTabSelect.tsx | 3 +++ packages/amis/src/renderers/Form/UserSelect.tsx | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/amis-ui/src/components/UserSelect.tsx b/packages/amis-ui/src/components/UserSelect.tsx index 2aa32d89416..eade24a6f97 100644 --- a/packages/amis-ui/src/components/UserSelect.tsx +++ b/packages/amis-ui/src/components/UserSelect.tsx @@ -45,6 +45,7 @@ export interface UserSelectProps controlled?: boolean; displayFields: Array; isTab?: boolean; + disabled?: boolean; fetcher?: ( api: Api, data?: any, @@ -995,6 +996,7 @@ export class UserSelect extends React.Component< showResultBox, labelField = 'label', valueField = 'value', + disabled, mobileUI } = this.props; @@ -1007,6 +1009,7 @@ export class UserSelect extends React.Component< className={cx('UserSelect-input', isOpened ? 'is-active' : '')} allowInput={false} result={this.getResult()} + disabled={disabled} itemRender={(option: any) => { if (labelField !== 'avatar') { return ( diff --git a/packages/amis-ui/src/components/UserTabSelect.tsx b/packages/amis-ui/src/components/UserTabSelect.tsx index 8c10022dd82..9f5f3c5fb7f 100644 --- a/packages/amis-ui/src/components/UserTabSelect.tsx +++ b/packages/amis-ui/src/components/UserTabSelect.tsx @@ -35,6 +35,7 @@ export interface UserTabSelectProps extends ThemeProps, LocaleProps { selection?: Array