【发布时间】:2022-06-13 15:49:03
【问题描述】:
我正在为我的应用程序使用 Ionic 框架 6 和 Angular 13。我想在此调整离子模式的大小。我试图在创建的同时传递一个全局类。它不工作。我试图调整包装类的大小。它在以前版本的 Ionic -5 中工作。但不是在这里。请帮忙。提前致谢。
commonService.ts
async createPopup(options) {
options.componentProps.service = this;
const ref = await this.modalController.create({
component: AppModalPopupComponent,
...options
});
if (!this.modalPopup?.length) { this.modalPopup = []; }
this.modalPopup.push(ref);
ref.present();
return ref;
}
component.ts
this.modalService.createPopup(
{
backdropDismiss: true,
componentProps: {
header: 'Update Banner in My Queue',
component: AppUpdateImagePopoverComponent
},
cssClass: "image-popup-modal-css"
});```
Global.scss
.image-popup-modal-css {
height: 100%;
width: 100%;
color: var(--app-secondary-color);
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
.image-popup-modal-css .modal-wrapper {
display: grid;
grid-template-columns: auto;
grid-auto-rows: minmax(min-content, max-content);
height: 100%;
border-radius: 10px;
margin: 20px;
position: absolute;
top:0
}
【问题讨论】:
-
请分享您的代码或输出
-
@RaviAshara,请看一下。即使使用包装类我也无法控制高度
标签: angular ionic-framework modal-dialog