feat(components): calendar component header support slot (#3316)

* feat(components): calendar component header support slot

* feat(components): calendar component header support slot

* feat(components): calendar component header support slot
This commit is contained in:
啝裳 2021-09-12 18:32:53 +08:00 committed by GitHub
parent d43064c054
commit 629fef2993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,12 @@
<template>
<div class="el-calendar">
<div class="el-calendar__header">
<slot name="header" :date="i18nDate">
<div class="el-calendar__title">{{ i18nDate }}</div>
<div v-if="validatedRange.length === 0" class="el-calendar__button-group">
<div
v-if="validatedRange.length === 0"
class="el-calendar__button-group"
>
<el-button-group>
<el-button size="mini" @click="selectDate('prev-month')">
{{ t('el.datepicker.prevMonth') }}
@ -15,6 +19,7 @@
</el-button>
</el-button-group>
</div>
</slot>
</div>
<div v-if="validatedRange.length === 0" class="el-calendar__body">
<date-table :date="date" :selected-day="realSelectedDay" @pick="pickDay">