ionic—alert弹出框
生活随笔
收集整理的這篇文章主要介紹了
ionic—alert弹出框
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
修改彈窗樣式:
async presentAlertNotCompleted() { // 操作未完成
const alert = await this.alertController.create({
message: <img id="cueIcon" src="../../assets/images/operate-finish-cue.png" alt="圖標"> <h4>提示</h4> <ion-label color="cw999">完成全部命令才能進行下一步哦~</ion-label>
});
this.cueStyle(document.getElementById(‘cueIcon’));
await alert.present();
}
async cueStyle(cueIcon) {
const cueArea = cueIcon.parentElement;
cueArea.style.cssText = ‘text-align: center;’;
}
參考網址:
https://ionicframework.com/docs/api/alert
https://blog.csdn.net/fjxcsdn/article/details/89487482
總結
以上是生活随笔為你收集整理的ionic—alert弹出框的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python小练习——电影数据集TMDB
- 下一篇: 基于js alert confirm样式