From 00805c8d6c1f464aba973706e932d15975d3296b Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Thu, 8 Sep 2022 21:19:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E7=B1=BB=E6=8E=A7=E4=BB=B6=20placeholder=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=A2=AB=E7=BF=BB=E8=AF=91=E7=9A=84=E9=97=AE=E9=A2=98=20(#5336?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-core/src/renderers/Options.tsx | 4 +++- packages/amis-ui/src/components/Selection.tsx | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/amis-core/src/renderers/Options.tsx b/packages/amis-core/src/renderers/Options.tsx index 04fd5942b..83175ddc6 100644 --- a/packages/amis-core/src/renderers/Options.tsx +++ b/packages/amis-core/src/renderers/Options.tsx @@ -1271,7 +1271,8 @@ export function registerOptionsControl(config: OptionsConfig) { pathSeparator, delimiter = ',', labelField = 'label', - valueField = 'value' + valueField = 'value', + translate: __ } = this.props; const {nodePathArray, nodeValueArray} = normalizeNodePath( @@ -1286,6 +1287,7 @@ export function registerOptionsControl(config: OptionsConfig) { return ( extends React.Component { static itemRender(option: Option, states: ItemRenderStates) { - return {option.label}; + return ( + + {option.label} + {option.tip || ''} + + ); } static defaultProps = {