ionic3和ionic4的 ModalController
ionic3 的 ModalController
ionic3 ModalController 的 create()方法:
create(component, 数据(可选), 选项(可选): ModalOptions): Modal
只有以下几个选项,类型为(ModalOptions):(官方文档: https://ionicframework.com/docs/v3/api/components/modal/ModalController/ )
showBackdrop?: boolean;
enableBackdropDismiss?: boolean;
enterAnimation?: string;
leaveAnimation?: string;
cssClass?: string;
ionic4的create()方法 :(官方文档:https://ionicframework.com/docs/api/modal)
改为一个参数,类型为对象,
this.modalController.create({
component: ModalPage,
...
});
所有选择:
showBackdrop
enterAnimation
leaveAnimation
cssClass
component
componentProps
animated (新增)
backdropDismiss (新增,原来的enableBackdropDismiss去掉了)
keyboardClose (新增)
mode (新增)
喜欢的话,请点赞,转发、收藏、评论,谢谢!