angularjs 设置对话框打开或离开Angular 13时的持续时间

kd3sttzy  于 2023-03-22  发布在  Angular
关注(0)|答案(1)|浏览(192)

我在angular 13上使用NgDialogAnimationService,一切正常,但缺少一件事,我需要设置对话框打开和离开时的持续时间属性,但我不能,有些可以帮助!

import { NgDialogAnimationService } from 'ng-dialog-animation';

    private dialogs:NgDialogAnimationService,

  onView(row: any) {
    this.dialogs.open(LogViewComponent, {
      width: "250px",
      animation: { to: "aside" },
      data: {
        dialogData: row,
      }

    }).afterClosed().subscribe(result => {
      // this.loadData();
    });
  }
8qgya5xd

8qgya5xd1#

您需要使用关键帧选项:

animation: {
        to: "aside",
        incomingOptions: {
          keyframeAnimationOptions: { duration: 1000, easing: "steps(7, end)" }
        }
      },

看看这个:https://stackblitz.com/edit/angular-material-animation?file=app%2Fdialog-overview-example.ts,app%2Fdialog-overview-example.html

相关问题