mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
fix:先还原 custom 和 wrapper 的透传 (#1860)
This commit is contained in:
parent
000a1b5423
commit
4c3bf8e038
@ -107,8 +107,7 @@ export class Custom extends React.Component<CustomProps, object> {
|
||||
wrapperComponent,
|
||||
inline,
|
||||
translate: __,
|
||||
classnames: cx,
|
||||
...rest
|
||||
classnames: cx
|
||||
} = this.props;
|
||||
const Component = wrapperComponent || inline ? 'span' : 'div';
|
||||
return (
|
||||
@ -117,7 +116,6 @@ export class Custom extends React.Component<CustomProps, object> {
|
||||
className={cx(className)}
|
||||
id={id}
|
||||
dangerouslySetInnerHTML={{__html: html ? html : ''}}
|
||||
{...rest}
|
||||
></Component>
|
||||
);
|
||||
}
|
||||
|
@ -53,20 +53,12 @@ export default class Wrapper extends React.Component<WrapperProps, object> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
className,
|
||||
size,
|
||||
classnames: cx,
|
||||
style,
|
||||
translate: __,
|
||||
...rest
|
||||
} = this.props;
|
||||
const {className, size, classnames: cx, style} = this.props;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cx('Wrapper', size ? `Wrapper--${size}` : '', className)}
|
||||
style={style}
|
||||
{...rest}
|
||||
>
|
||||
{this.renderBody()}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user