import { createNamespace } from '../../utils'; import { t, bem } from '../utils'; const [createComponent] = createNamespace('calendar-header'); export default createComponent({ props: { title: String, monthTitle: String, }, methods: { genTitle() { const title = this.slots('title') || this.title || t('title'); return
{title}
; }, genMonth() { return
{this.monthTitle}
; }, genWeekDays() { const weekdays = t('weekdays'); return (
{weekdays.map(item => ( {item} ))}
); }, }, render() { return (
{this.genTitle()} {this.genMonth()} {this.genWeekDays()}
); }, });