diff --git a/src/calendar/components/Month.js b/src/calendar/components/Month.js index 7bbdc38cf..05d6ad792 100644 --- a/src/calendar/components/Month.js +++ b/src/calendar/components/Month.js @@ -20,10 +20,11 @@ export default createComponent({ minDate: Date, maxDate: Date, showMark: Boolean, - showTitle: Boolean, rowHeight: [Number, String], formatter: Function, currentDate: [Date, Array], + showSubtitle: Boolean, + showMonthTitle: Boolean, }, data() { @@ -89,7 +90,11 @@ export default createComponent({ methods: { scrollIntoView() { - this.$refs.days.scrollIntoView(); + if (this.showSubtitle) { + this.$refs.days.scrollIntoView(); + } else { + this.$refs.month.scrollIntoView(); + } }, getMultipleDayType(day) { @@ -202,7 +207,7 @@ export default createComponent({ }, genTitle() { - if (this.showTitle) { + if (this.showMonthTitle) { return