Ionic framework Ionic4 Ion选择样式属性不工作
我想为我的警报控制器应用css属性,但不起作用 home.htmlIonic framework Ionic4 Ion选择样式属性不工作,ionic-framework,ionic4,Ionic Framework,Ionic4,我想为我的警报控制器应用css属性,但不起作用 home.html 这是我在项目中的工作解决方案 home.ts global.scss 你到底想给selectcss或alert box css什么?如果你想提醒框css,那么我已经在下面分享了我的解决方案 <ion-select [(ngModel)]="accountSystem" placeholder="Match Accounting Standard" okText="Done" cancelText="Cancel"
这是我在项目中的工作解决方案 home.ts global.scss
你到底想给selectcss或alert box css什么?如果你想提醒框css,那么我已经在下面分享了我的解决方案
<ion-select [(ngModel)]="accountSystem" placeholder="Match Accounting Standard" okText="Done" cancelText="Cancel" class="select-account">
<ion-select-option value="PRC Gaap">PRC Gaap</ion-select-option>
<ion-select-option value="IFRS">IFRS</ion-select-option>
<ion-select-option value="US Gaap">US Gaap</ion-select-option>
</ion-select>
.select-account{
.alert-wrapper{
.alert-button-inner{
color:rgb(239,52,52);
}
.alert-button{
color:rgb(52,223,57);
}
}}
const alert = await this.alertCtrl.create({
header: "Alert",
mode: "ios",
cssClass: "codealert",
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'alertbutton',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Ok',
cssClass: 'alertbutton',
handler: () => {
console.log('Confirm Ok');
}
}
]
});
await alert.present();
}
.codealert {
--background: white;
}
.alertbutton {
color: #600001 !important;
font-weight: bold;
}