feat: card subTitle支持更多渲染方式 (#10037)

* feat: card subTitle支持更多渲染方式

* feat: card subTitle支持更多渲染方式

* feat: card subTitle支持更多渲染方式

---------

Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
qkiroc 2024-04-17 00:25:39 -07:00 committed by GitHub
parent f5aecd7849
commit d5299267ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ export interface CardSchema extends BaseSchema {
/**
*
*/
subTitle?: SchemaTpl;
subTitle?: SchemaTpl | Schema;
subTitleClassName?: SchemaClassName;
subTitlePlaceholder?: string;
@ -593,8 +593,8 @@ export class CardRenderer extends React.Component<CardProps> {
if (header) {
const {subTitle: subTitleTpl} = header || {};
const subTitle = filter(subTitleTpl, data);
return subTitle ? render('sub-title', subTitleTpl!) : undefined;
// const subTitle = filter(subTitleTpl, data);
return subTitleTpl ? render('sub-title', subTitleTpl, data) : undefined;
}
return;
}