From 8a87d27ab9ec07f9d6e99aafa04817beecd1a343 Mon Sep 17 00:00:00 2001 From: wibetter <365533093@qq.com> Date: Mon, 28 Nov 2022 15:59:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(amis-saas-8381):=20select=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I47acd8a76dd77e8222ec2642035b1660bb8f151d --- packages/amis-editor/src/renderer/OptionControl.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amis-editor/src/renderer/OptionControl.tsx b/packages/amis-editor/src/renderer/OptionControl.tsx index 5dbcf08fc..46c3d35eb 100644 --- a/packages/amis-editor/src/renderer/OptionControl.tsx +++ b/packages/amis-editor/src/renderer/OptionControl.tsx @@ -59,7 +59,7 @@ export default class OptionControl extends React.Component< let source: 'custom' | 'api' | 'apicenter' = 'custom'; - if (props.data.source) { + if (props.data.hasOwnProperty('source') && props.data.source) { const api = props.data.source; const url = typeof api === 'string' @@ -796,7 +796,7 @@ export default class OptionControl extends React.Component< ) : null} - {this.renderApiPanel()} + {(source === 'api' || source === 'apicenter') && this.renderApiPanel()} ); }