fix(drawer): toggle animation

This commit is contained in:
07akioni 2021-06-06 19:18:34 +08:00
parent 2bf68e094b
commit e23e379ba8
3 changed files with 7 additions and 5 deletions

View File

@ -13,6 +13,7 @@
### Fixes
- Fix `n-tab-pane` `display-directive` not working.
- Fix `n-drawer` animation.
## 2.11.3

View File

@ -13,6 +13,7 @@
### Fixes
- 修正 `n-tab-pane` `display-directive` 不生效
- 修正 `n-drawer` 动画
## 2.11.3

View File

@ -26,7 +26,7 @@ export default defineComponent({
inheritAttrs: false,
props: {
show: {
type: Boolean,
type: Boolean as PropType<boolean | undefined>,
default: undefined
},
displayDirective: {
@ -66,10 +66,10 @@ export default defineComponent({
displayed: displayedRef,
transitionName: computed(() => {
return {
right: 'n-slide-in-from-right-transition',
left: 'n-slide-in-from-left-transition',
top: 'n-slide-in-from-top-transition',
bottom: 'n-slide-in-from-bottom-transition'
right: 'slide-in-from-right-transition',
left: 'slide-in-from-left-transition',
top: 'slide-in-from-top-transition',
bottom: 'slide-in-from-bottom-transition'
}[props.placement]
}),
handleAfterLeave