如何在 Ionic 4 上关闭弹出窗口时禁用动画

How to disable animation when popover dismiss on Ionic 4

我需要在弹出窗口关闭时禁用淡入淡出动画。

我试过在 ionic 2 上做解决方案,但我认为 ionic 4 确实有不同的弹出窗口。
我已经看过 ionic 4 文档 https://ionicframework.com/docs/api/popover。但是在 popover 创建时添加 leaveAnimation: undefined or null 并不能解决问题

      component: PopoverComponent,
      event: ev,
      translucent: true,
      leaveAnimation: undefined,
      componentProps: { buttons: ['Edit', 'Delete'] }
    });

我希望弹出窗口关闭时不会出现淡入淡出的动画

设置leaveAnimation: popoverLeaveAnimation

export function popoverLeaveAnimation(Anim: Animation, base: HTMLElement): Promise<Animation> {

    return Promise.resolve(new Anim());

}