diff --git a/packages/calendar/README.md b/packages/calendar/README.md index 5844cbdc..05349ae5 100644 --- a/packages/calendar/README.md +++ b/packages/calendar/README.md @@ -257,10 +257,12 @@ Page({ ```css .calendar { - --calendar-height: 500px; + --calendar-height: 618px; } ``` +> Tips: 注意,在自定义calendar的高度时,需要确保,滚动到当前月份时,所有的日期要展现在.van-calendar__body内,否则可能会出现滚动时头部月份与当前月份不同步的情况。目前平铺型预设高度618px,弹窗型高度90%。 + ## API ### Props diff --git a/packages/calendar/demo/index.less b/packages/calendar/demo/index.less index c4b0001f..ad853ccc 100644 --- a/packages/calendar/demo/index.less +++ b/packages/calendar/demo/index.less @@ -1,3 +1,3 @@ .tiled-calendar { - --calendar-height: 500px; + --calendar-height: 618px; } diff --git a/packages/common/style/var.less b/packages/common/style/var.less index 762e9314..719bd951 100644 --- a/packages/common/style/var.less +++ b/packages/common/style/var.less @@ -123,7 +123,7 @@ // Calendar @calendar-height: 100%; @calendar-background-color: @white; -@calendar-popup-height: 80%; +@calendar-popup-height: 90%; @calendar-header-box-shadow: 0 2px 10px rgba(125, 126, 128, 0.16); @calendar-header-title-height: 44px; @calendar-header-title-font-size: @font-size-lg;