mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-09-01 21:59:45 +08:00
fix(Calendar): title slot not work #7826
This commit is contained in:
parent
26d112ab00
commit
b3b03e20be
@ -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>;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user