list 的 placeholder 支持 html或者其他渲染器

This commit is contained in:
2betop 2020-06-30 11:40:20 +08:00
parent beb44605f5
commit 241884f270
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@
&-placeholder { &-placeholder {
color: $text--muted-color; color: $text--muted-color;
text-align: center; text-align: center;
height: $List-placeholder-height; min-height: $List-placeholder-height;
line-height: $List-placeholder-height; line-height: $List-placeholder-height;
} }
} }

View File

@ -789,7 +789,9 @@ export default class List extends React.Component<ListProps, object> {
)} )}
</div> </div>
) : ( ) : (
<div className={cx('List-placeholder')}>{__(placeholder)}</div> <div className={cx('List-placeholder')}>
{render('placeholder', __(placeholder))}
</div>
)} )}
{this.renderFooter()} {this.renderFooter()}