修改弹窗样式:
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