fix(Calendar): title slot not work #7826
This commit is contained in:
@@ -16,7 +16,7 @@ export default createComponent({
|
|||||||
const renderTitle = () => {
|
const renderTitle = () => {
|
||||||
if (props.showTitle) {
|
if (props.showTitle) {
|
||||||
const text = props.title || t('title');
|
const text = props.title || t('title');
|
||||||
const title = slots.title ? slots.title : text;
|
const title = slots.title ? slots.title() : text;
|
||||||
return <div class={bem('header-title')}>{title}</div>;
|
return <div class={bem('header-title')}>{title}</div>;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user