离子切换背景色不起作用

时间:2018-08-28 11:13:56

标签: ionic-framework colors background toggle

我有四个离子拨动开关,其中之一的颜色未正确计算/显示:

SASS变量:

instruct: #74b230,
partic: #5076f1,
lock: #ff6600,
workplace: #bda7de

HTML

<ion-list>
    <ion-item *ngIf="this.filterpopoptions.get(filterpopoveroptions.HASPARTIC)">
      <ion-label>Teilnahmen</ion-label>
      <ion-toggle [(ngModel)]="this.data.partic" color="partic"></ion-toggle>
    </ion-item>
    <ion-item *ngIf="this.filterpopoptions.get(filterpopoveroptions.HASINSTRUCT)">
      <ion-label>Referententätigkeiten</ion-label>
      <ion-toggle [(ngModel)]="this.data.instruct" color="instruct"></ion-toggle>
    </ion-item>
    <ion-item *ngIf="this.filterpopoptions.get(filterpopoveroptions.HASWORKPLACE)">
      <ion-label>Ausbildungsstationen</ion-label>
      <ion-toggle [(ngModel)]="this.data.workplace" color="workplace"></ion-toggle>
    </ion-item>
    <ion-item *ngIf=" this.filterpopoptions.get(filterpopoveroptions.HASLOCK)">
      <ion-label>Nichtverfügbarkeiten</ion-label>
      <ion-toggle [(ngModel)]="this.data.lock" color="lock"></ion-toggle>
    </ion-item>

Result

1 个答案:

答案 0 :(得分:0)

通过使用较深的颜色解决了该问题。颜色太浅,无法计算背景色。