fix: 修复 tpl wrapperComponent 不生效问题 (#1645)

This commit is contained in:
吴多益 2021-03-14 16:10:59 +08:00 committed by GitHub
parent 8b56081b53
commit 9ffb5696c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ export class Tpl extends React.Component<TplProps, object> {
render() {
const {className, wrapperComponent, inline, classnames: cx} = this.props;
const Component = wrapperComponent || inline ? 'span' : 'div';
const Component = wrapperComponent || (inline ? 'span' : 'div');
return (
<Component ref={this.htmlRef} className={cx('TplField', className)}>