ionic-team / ionic-team/ionic-framework
Ionic 4 Modal not appearing with transparent background
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 50
描述
**Ionic version:**
[x] **4.x**
**I'm submitting a ...**
[ ] bug report
[ ] feature request
**Current behavior:**
My Modal is appearing with a solid background/Overlay
**Expected behavior:**
I want my modal to appear with a transparent background/overlay
**Steps to reproduce:**
**Related code:**
```
insert short code snippets here
modal.scss :
.main_view{
background: transparent;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
opacity: .5;
background-color: #333;
}
modal.html:
and .ts to invoke modal in my app:
async confirm(){
const modal = await this.modalCtrl.create({
component: ModalPage,
// componentProps: {value : "test"},
});
await modal.present();
modal.onDidDismiss().then(res => {
console.log(JSON.stringify(res))
this.isModalDismiss = res.data.isDismiss;
console.log(this.isModalDismiss)
this.routeDriver();
});
}
```
**Other information:**
**Ionic info:**
```
insert the output from ionic info here
```
贡献指南
调研方向
从链接的 StackBlitz 示例及其 pages/modal/modal.scss 开始,然后将其与提供的 modal.scss、modal.html 和 confirm() 代码进行比较。在受影响的应用中复现该 modal,并确定其背景或 overlay 与预期的透明外观不同的原因;完成标准是 modal 以预期的透明背景和 overlay 进行渲染。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- scss, typescript
- 领域
- frontend, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100