chore(Calendar): show first month title when subtitle is hidden

This commit is contained in:
chenjiahan
2020-03-09 23:08:15 +08:00
parent 17ecc980a7
commit 885a9e6ac7
2 changed files with 12 additions and 5 deletions
+3 -1
View File
@@ -327,6 +327,7 @@ export default createComponent({
},
genMonth(date, index) {
const showMonthTitle = index !== 0 || !this.showSubtitle;
return (
<Month
ref="months"
@@ -339,8 +340,9 @@ export default createComponent({
showMark={this.showMark}
formatter={this.formatter}
rowHeight={this.rowHeight}
showTitle={index !== 0}
currentDate={this.currentDate}
showSubtitle={this.showSubtitle}
showMonthTitle={showMonthTitle}
onClick={this.onClickDay}
/>
);