提交成功:
let toast = this.toastCtrl.create({
message: '输入不能为空',
duration: 3000,
position: 'middle',//位置
cssClass: "success"
});
toast.present();
scss中写,全局定义,放在page 外面:
.success {
.toast-message {
font-size: 5px;
padding-top: 8px;
}
.toast-wrapper {
text-align: center;
width: 90px;
height:30px;
background: #098a6a;
border-radius:2px;
@extend .box;
}
}
提交失败
let toast = this.toastCtrl.create({
message: '输入不能为空',
duration: 3000,
position: 'middle',//位置
cssClass: "error"
});
toast.present();
scss中写,放在page 外面:
.error {
.toast-message {
font-size: 5px;
padding-top: 8px;
}
.toast-wrapper {
text-align: center;
width: 105px;
height:30px;
background: #e92828;
border-radius:2px;
@extend .box;
}
}