[]popupEffect 有谁能告诉我dialog的这个东西要怎么用啊?

popupEffect 有谁能告诉我dialog的这个东西要怎么用啊?这里面加了Handler 以后是不是还要加什么东西,能不能有个demo啊,找了半天没有找到
this.popupEffect = new Handler(this, () => {
this.scale(0.2, 0.2);
Laya.Tween.to(this, { scaleX: 1, scaleY: 1 }, 2000);
});
已邀请:

Aar0n

赞同来自:

   public var popupEffect:Handler;
        /**
         * 关闭对话框效果,可以设置一个效果代替默认的关闭效果,如果不想有任何效果,可以赋值为null
         * 全局默认关闭效果可以通过manager.closeEffect修改
 
   public var popupEffect:Function = function(dialog:Sprite):void {
            dialog.scale(1, 1);
            Tween.from(dialog, {x: Laya.stage.width / 2, y: Laya.stage.height / 2, scaleX: 0, scaleY: 0}, 300, Ease.backOut, Handler.create(this, this.doOpen, [dialog]));
        }

1553745787用户

赞同来自:

class DialogPage extends ui.DialogPageUI {
private tip:Laya.TipManager = new Laya.TipManager();
constructor() {
super();
this.popupEffect= new Laya.Handler(this, function(dialog:Dialog):void {
dialog.scale(1, 1);
Laya.Tween.from(dialog, {x: Laya.stage.width / 2, y: Laya.stage.height / 2, scaleX: 0, scaleY: 0}, 2000, Laya.Ease.bounceOut, Laya.Handler.create(this, this.doOpen, [dialog]));
});
this.show();
this.dragArea = "0,0,500,64";
this.toolTip = "左键点击标题栏可以进行拖动";

}
public onOpened():void{
console.log("Dialog页面已打开");
}
}

要回复问题请先

商务合作
商务合作