@@ -57,26 +57,24 @@ function getMarkCellClassName(index, items) {
57
57
}
58
58
function isDisplay ( index , items ) {
59
59
// 找到需要当前月需要展示的日期最大最小索引
60
- var _items$reduce = items . reduce ( function ( res , item ) {
61
- // !item.inThisMonth 被隐藏掉的日期
62
- // !item.isRange 不在传入范围内的日期
63
- if ( ! ( ! item . inThisMonth || ! item . isRange ) ) {
64
- if ( res . minIndex === null || res . maxIndex === null ) {
65
- res . minIndex = item . index ;
66
- res . maxIndex = item . index ;
67
- }
68
- res . minIndex = Math . min ( res . minIndex , item . index ) ;
69
- res . maxIndex = Math . max ( res . maxIndex , item . index ) ;
60
+ var _items_reduce = items . reduce ( function ( res , item ) {
61
+ // !item.inThisMonth 被隐藏掉的日期
62
+ // !item.isRange 不在传入范围内的日期
63
+ if ( ! ( ! item . inThisMonth || ! item . isRange ) ) {
64
+ if ( res . minIndex === null || res . maxIndex === null ) {
65
+ res . minIndex = item . index ;
66
+ res . maxIndex = item . index ;
70
67
}
71
- return res ;
72
- } , {
73
- minIndex : null ,
74
- maxIndex : null
75
- } ) ,
76
- minIndex = _items$reduce . minIndex ,
77
- maxIndex = _items$reduce . maxIndex ;
78
- if ( maxIndex === null || maxIndex === null ) return true ;
79
- return index >= Math . floor ( minIndex / 7 ) * 7 && index < Math . ceil ( maxIndex / 7 ) * 7 ;
68
+ res . minIndex = Math . min ( res . minIndex , item . index ) ;
69
+ res . maxIndex = Math . max ( res . maxIndex , item . index ) ;
70
+ }
71
+ return res ;
72
+ } , {
73
+ minIndex : null ,
74
+ maxIndex : null
75
+ } ) ;
76
+ if ( _items_reduce . maxIndex === null || _items_reduce . maxIndex === null ) return true ;
77
+ return index >= Math . floor ( _items_reduce . minIndex / 7 ) * 7 && index < Math . ceil ( _items_reduce . maxIndex / 7 ) * 7 ;
80
78
}
81
79
export default {
82
80
getSpaceClassName : getSpaceClassName ,
0 commit comments