feat(Calendar): add show-title prop (#5779)

This commit is contained in:
chenjiahan
2020-03-09 20:37:37 +08:00
parent ab82f42f6a
commit e575bb4bb1
5 changed files with 27 additions and 2 deletions
+5
View File
@@ -6,11 +6,16 @@ const [createComponent] = createNamespace('calendar-header');
export default createComponent({
props: {
title: String,
showTitle: Boolean,
monthTitle: String,
},
methods: {
genTitle() {
if (!this.showTitle) {
return;
}
const title = this.slots('title') || this.title || t('title');
return <div class={bem('header-title')}>{title}</div>;
},