admin管理员组文章数量:1404760
I have a Ionic Project written on Ionic 5 Angular that has some popups using SweetAlerts2.
Today I decided to update Ionic to Ionic6 and SweetAlerts2 popups doesn't look right. Like the alert is only visible on the header and everything else is blank.
Screenshot of the problem:
Ionic6 Visualization Problem
Code:
swal.fire({
html:
'<br><label style="font-size:80%">Example Alert</label>',
showDenyButton: true,
confirmButtonText: "Confirm",
denyButtonText: "Deny",
denyButtonColor: 'grey',
confirmButtonColor: 'var(--ion-color-primary)',
})
Repository where the problem is reproduced
I have a Ionic Project written on Ionic 5 Angular that has some popups using SweetAlerts2.
Today I decided to update Ionic to Ionic6 and SweetAlerts2 popups doesn't look right. Like the alert is only visible on the header and everything else is blank.
Screenshot of the problem:
Ionic6 Visualization Problem
Code:
swal.fire({
html:
'<br><label style="font-size:80%">Example Alert</label>',
showDenyButton: true,
confirmButtonText: "Confirm",
denyButtonText: "Deny",
denyButtonColor: 'grey',
confirmButtonColor: 'var(--ion-color-primary)',
})
Repository where the problem is reproduced
Share edited May 24, 2022 at 14:17 Pablo Ramos Muras asked May 24, 2022 at 11:49 Pablo Ramos MurasPablo Ramos Muras 234 bronze badges 4- Please give us a some reproducible example – Shifenis Commented May 24, 2022 at 13:18
- I will make a new github repository with an example, give me some minutes. – Pablo Ramos Muras Commented May 24, 2022 at 13:36
- The reproducible example is added on a github repository – Pablo Ramos Muras Commented May 24, 2022 at 13:47
- In ionic, you have to set the heightAuto to false eg Swal.fire({title:'Title',heightAuto:false}) – Jasper Commented Jul 14, 2022 at 10:33
1 Answer
Reset to default 10This has been addressed in this issue
Simply use this option with Ionic Framework.
heightAuto: false
本文标签: javascriptProblem with SweetAlert2 and Ionic6 not visualizing correctlyStack Overflow
版权声明:本文标题:javascript - Problem with SweetAlert2 and Ionic6 not visualizing correctly - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744856425a2628802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论