diff --git a/components/datepicker/index.jsx b/components/datepicker/index.jsx index 9bc87802a4..f77155a6b7 100644 --- a/components/datepicker/index.jsx +++ b/components/datepicker/index.jsx @@ -20,13 +20,8 @@ function createPicker(TheCalendar) { onChange() { }, // onChange 可用于 Validator locale: {}, - // 自动换方向有很多视觉和交互问题 - // 需求不是很大,和设计师协商后不做 align: { - points: ['tl', 'tl'], - overflow: {adjustX: 0, adjustY: 0}, offset: [0, -10], - targetOffset: [0, 0] } }; }, diff --git a/package.json b/package.json index 8426129e97..159b327e8e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "gregorian-calendar-format": "~4.0.4", "object-assign": "~4.0.1", "rc-animate": "~2.0.0", - "rc-calendar": "~4.0.0-alpha15", + "rc-calendar": "4.0.0-alpha15", "rc-checkbox": "~1.1.1", "rc-collapse": "~1.4.0", "rc-dialog": "~5.2.0", diff --git a/style/components/datepicker/Calendar.less b/style/components/datepicker/Calendar.less index 3c069dab49..f49d0281cf 100644 --- a/style/components/datepicker/Calendar.less +++ b/style/components/datepicker/Calendar.less @@ -271,28 +271,4 @@ bottom: 9px; right: 9px; } - - &.slide-up-enter.slide-up-enter-active&-placement-topLeft, - &.slide-up-enter.slide-up-enter-active&-placement-topRight, - &.slide-up-appear.slide-up-appear-active&-placement-topLeft, - &.slide-up-appear.slide-up-appear-active&-placement-topRight { - animation-name: antSlideUpIn; - } - - &.slide-up-enter.slide-up-enter-active&-placement-bottomLeft, - &.slide-up-enter.slide-up-enter-active&-placement-bottomRight, - &.slide-up-appear.slide-up-appear-active&-placement-bottomLeft, - &.slide-up-appear.slide-up-appear-active&-placement-bottomRight { - animation-name: antSlideDownIn; - } - - &.slide-up-leave.slide-up-leave-active&-placement-topLeft, - &.slide-up-leave.slide-up-leave-active&-placement-topRight { - animation-name: antSlideUpOut; - } - - &.slide-up-leave.slide-up-leave-active&-placement-bottomLeft, - &.slide-up-leave.slide-up-leave-active&-placement-bottomRight { - animation-name: antSlideDownOut; - } } diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less index f14248c970..2109dc7878 100644 --- a/style/components/datepicker/Picker.less +++ b/style/components/datepicker/Picker.less @@ -1,6 +1,30 @@ .@{calendar-prefix-cls}-picker-container { position: absolute; z-index: 1070; + + &.slide-up-enter.slide-up-enter-active&-placement-topLeft, + &.slide-up-enter.slide-up-enter-active&-placement-topRight, + &.slide-up-appear.slide-up-appear-active&-placement-topLeft, + &.slide-up-appear.slide-up-appear-active&-placement-topRight { + animation-name: antSlideDownIn; + } + + &.slide-up-enter.slide-up-enter-active&-placement-bottomLeft, + &.slide-up-enter.slide-up-enter-active&-placement-bottomRight, + &.slide-up-appear.slide-up-appear-active&-placement-bottomLeft, + &.slide-up-appear.slide-up-appear-active&-placement-bottomRight { + animation-name: antSlideUpIn; + } + + &.slide-up-leave.slide-up-leave-active&-placement-topLeft, + &.slide-up-leave.slide-up-leave-active&-placement-topRight { + animation-name: antSlideDownOut; + } + + &.slide-up-leave.slide-up-leave-active&-placement-bottomLeft, + &.slide-up-leave.slide-up-leave-active&-placement-bottomRight { + animation-name: antSlideUpOut; + } } .@{calendar-prefix-cls}-picker {