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

This commit is contained in:
2betop 2020-06-30 11:40:20 +08:00
parent 9744ff5ba6
commit 1b3033d73d
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@
&-placeholder {
color: $text--muted-color;
text-align: center;
height: $List-placeholder-height;
min-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 className={cx('List-placeholder')}>{__(placeholder)}</div>
<div className={cx('List-placeholder')}>
{render('placeholder', __(placeholder))}
</div>
)}
{this.renderFooter()}