mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
docs(demos): use default animation
This commit is contained in:
@ -17,11 +17,7 @@ class ModalsFirstPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openModal() {
|
openModal() {
|
||||||
this.modal.open(ModalsContentPage, {
|
this.modal.open(ModalsContentPage);
|
||||||
handle: 'my-awesome-modal',
|
|
||||||
enterAnimation: 'my-fade-in',
|
|
||||||
leaveAnimation: 'my-fade-out'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -54,27 +50,3 @@ export class ModalsPage {
|
|||||||
this.rootView = ModalsFirstPage;
|
this.rootView = ModalsFirstPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FadeIn extends Animation {
|
|
||||||
constructor(element) {
|
|
||||||
super(element);
|
|
||||||
this
|
|
||||||
.easing('ease')
|
|
||||||
.duration(450)
|
|
||||||
.fadeIn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Animation.register('my-fade-in', FadeIn);
|
|
||||||
|
|
||||||
class FadeOut extends Animation {
|
|
||||||
constructor(element) {
|
|
||||||
super(element);
|
|
||||||
this
|
|
||||||
.easing('ease')
|
|
||||||
.duration(250)
|
|
||||||
.fadeOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Animation.register('my-fade-out', FadeOut);
|
|
||||||
|
Reference in New Issue
Block a user