fix:属性面板报错

Change-Id: I868818dadb55e6f0e7fe79730f667fc23f5fe334
This commit is contained in:
qianchuan 2022-08-17 11:47:44 +08:00
parent 764299b33d
commit 23beeae944

View File

@ -369,8 +369,9 @@ export default class APIControl extends React.Component<
@autobind @autobind
renderHeader() { renderHeader() {
const {render, label, labelRemark, useMobileUI, popOverContainer, env} = const {render, labelRemark, useMobileUI, popOverContainer, env} =
this.props; this.props;
const label: any = this.props.label;
const classPrefix = env?.theme?.classPrefix; const classPrefix = env?.theme?.classPrefix;
// const actionsDom = // const actionsDom =
@ -386,7 +387,7 @@ export default class APIControl extends React.Component<
return ( return (
<header className="ApiControl-header" key="header"> <header className="ApiControl-header" key="header">
<label className={cx(`${classPrefix}Form-label`)}> <label className={cx(`${classPrefix}Form-label`)}>
{label || ''} {label?.type ? render('label', label) : label || ''}
{labelRemark {labelRemark
? render('label-remark', { ? render('label-remark', {
type: 'remark', type: 'remark',