diff --git a/components/drawer/index.tsx b/components/drawer/index.tsx index 8c775b41e9..2a5718531e 100644 --- a/components/drawer/index.tsx +++ b/components/drawer/index.tsx @@ -63,9 +63,19 @@ class Drawer extends React.Component{show && } + const { visible } = this.props; + if (visible && this.parentDrawer) { + this.parentDrawer.push(); + } + } + public componentDidUpdate(preProps: DrawerProps) { const { visible } = this.props; if (preProps.visible !== visible && this.parentDrawer) { @@ -77,6 +87,14 @@ class Drawer extends React.Component { this.setState({ push: true, @@ -186,7 +204,7 @@ class Drawer extends React.Component { const { prefixCls, diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 228c585165..dc6a550689 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -11,10 +11,10 @@ z-index: @zindex-modal; width: 0%; height: 100%; - + transition: transform @animation-duration-slow @ease-base-out; > * { - transition: transform @animation-duration-slow @ease-base-in, - box-shadow @animation-duration-slow @ease-base-in; + transition: transform @animation-duration-slow @ease-base-out, + box-shadow @animation-duration-slow @ease-base-out; } &-content-wrapper { @@ -197,7 +197,6 @@ transition: opacity @animation-duration-slow linear, height 0s ease @animation-duration-slow; } &-open { - transition: transform @animation-duration-slow @ease-base-out; &-content { box-shadow: @shadow-2; }