fix: comment render nest style bug (#1389)
parent
548f10d357
commit
094f0325d9
|
@ -124,7 +124,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="undefined-nested">
|
||||
<div class="ant-comment-nested">
|
||||
<div class="ant-comment">
|
||||
<div class="ant-comment-inner">
|
||||
<div class="ant-comment-avatar"><span class="ant-avatar ant-avatar-circle ant-avatar-image"><img src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" alt="Han Solo"></span></div>
|
||||
|
@ -141,7 +141,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="undefined-nested">
|
||||
<div class="ant-comment-nested">
|
||||
<div class="ant-comment">
|
||||
<div class="ant-comment-inner">
|
||||
<div class="ant-comment-avatar"><span class="ant-avatar ant-avatar-circle ant-avatar-image"><img src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" alt="Han Solo"></span></div>
|
||||
|
|
|
@ -30,9 +30,7 @@ const Comment = {
|
|||
const actionList = actions.map((action, index) => <li key={`action-${index}`}>{action}</li>);
|
||||
return actionList;
|
||||
},
|
||||
renderNested(children) {
|
||||
const { prefixCls } = this.$props;
|
||||
|
||||
renderNested(prefixCls, children) {
|
||||
return <div class={`${prefixCls}-nested`}>{children}</div>;
|
||||
},
|
||||
},
|
||||
|
@ -85,7 +83,7 @@ const Comment = {
|
|||
return (
|
||||
<div class={prefixCls} {...{ on: this.$listeners }}>
|
||||
{comment}
|
||||
{children ? this.renderNested(children) : null}
|
||||
{children ? this.renderNested(prefixCls, children) : null}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue