离子4和Angular 5离子按钮的颜色和属性不起作用

问题描述 投票:0回答:2

我使用离子4和5角,由于某种原因,下面的[[Press Button ion-buttons元素未设置颜色或按钮的任何属性,我尝试了两种已知的设置颜色的方法,但是什么都不起作用?

<ion-row> <ion-col col-12> <ion-card> <ion-card-header> <h1>Companies</h1> </ion-card-header> <ion-card-content> <ion-row> <ion-col col-md-4> <ion-label>Comp</ion-label> <ion-select [(ngModel)]="filter_data_quick_sector" multiple="true" interface="popover" (ionChange)="quickSearch()"> <ion-option *ngFor="let sector of sectors" value="{{ sector }}">{{ sector }}</ion-option> </ion-select> </ion-col> <ion-col col-md-4> <ion-label>Country</ion-label> <ion-select [(ngModel)]="filter_data_quick_country" multiple="true" interface="popover" (ionChange)="quickSearch()"> <ion-option *ngFor="let country of countries" value="{{ country }}">{{ country }}</ion-option> </ion-select> </ion-col> <ion-col col-md-4> <ion-label>Investment</ion-label> <ion-select [(ngModel)]="filter_data_quick_investment_type" multiple="true" interface="popver" (ionChange)="quickSearch()"> <ion-option *ngFor="let investment_type of investment_types" value="{{ investment_type }}">{{ investment_type }} </ion-option> </ion-select> **<ion-row text-right> <ion-col col-md-6 offset-1=""> <ion-buttons slot="primary" fill="solid" style="--background:blue" size="small"> Press Button </ion-buttons> </ion-col> </ion-row>** </ion-col> </ion-row> <ion-row>
angular ionic-framework angular5 ionic4
2个回答
0
投票
您需要使用颜色字段来更改按钮颜色

0
投票
我意识到我应该将ion-button属性放在包裹在ion-buttons元素中的按钮元素中,用于我使用的角度和离子版本,如下所示:
© www.soinside.com 2019 - 2024. All rights reserved.