mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:19:01 +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,
|
wrapperComponent,
|
||||||
inline,
|
inline,
|
||||||
translate: __,
|
translate: __,
|
||||||
classnames: cx,
|
classnames: cx
|
||||||
...rest
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const Component = wrapperComponent || inline ? 'span' : 'div';
|
const Component = wrapperComponent || inline ? 'span' : 'div';
|
||||||
return (
|
return (
|
||||||
@ -117,7 +116,6 @@ export class Custom extends React.Component<CustomProps, object> {
|
|||||||
className={cx(className)}
|
className={cx(className)}
|
||||||
id={id}
|
id={id}
|
||||||
dangerouslySetInnerHTML={{__html: html ? html : ''}}
|
dangerouslySetInnerHTML={{__html: html ? html : ''}}
|
||||||
{...rest}
|
|
||||||
></Component>
|
></Component>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -53,20 +53,12 @@ export default class Wrapper extends React.Component<WrapperProps, object> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {className, size, classnames: cx, style} = this.props;
|
||||||
className,
|
|
||||||
size,
|
|
||||||
classnames: cx,
|
|
||||||
style,
|
|
||||||
translate: __,
|
|
||||||
...rest
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cx('Wrapper', size ? `Wrapper--${size}` : '', className)}
|
className={cx('Wrapper', size ? `Wrapper--${size}` : '', className)}
|
||||||
style={style}
|
style={style}
|
||||||
{...rest}
|
|
||||||
>
|
>
|
||||||
{this.renderBody()}
|
{this.renderBody()}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user