fix: 修复 card 变量经过多次处理的问题 (#3102)

This commit is contained in:
liaoxuezhi 2021-12-01 18:35:37 +08:00 committed by GitHub
parent 764e8b2daa
commit ee3783a319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -556,7 +556,7 @@ export class Card extends React.Component<CardProps> {
header?.titleClassName || titleClassName
)}
>
{render('title', title)}
{render('title', titleTpl!)}
</div>
) : null}
@ -567,7 +567,7 @@ export class Card extends React.Component<CardProps> {
header?.subTitleClassName || subTitleClassName
)}
>
{render('sub-title', subTitle || subTitlePlaceholder!, {
{render('sub-title', subTitleTpl || subTitlePlaceholder!, {
className: cx(!subTitle ? 'Card-placeholder' : undefined)
})}
</div>
@ -582,7 +582,7 @@ export class Card extends React.Component<CardProps> {
descClassName
)}
>
{render('desc', desc || descPlaceholder!, {
{render('desc', header?.description || descTpl!, {
className: !desc ? 'text-muted' : undefined
})}
</div>