首页 > 解决方案 > 离子列表按钮在右图标显示时调整大小

问题描述

我在列表右侧动态显示/隐藏图标。但是,当图标显示时,会ion-item稍微放大一点。

知道如何解决这个问题吗?绝对不是这样好的用户体验。

<ion-list>
    <ion-item-divider color="primary">
      Select
    </ion-item-divider>
    <button ion-item *ngFor="let property of properties; let i = index" (click)="propertySelected(property)" >
      {{ property }}
      <ion-icon *ngIf="propertySet[i]" name="checkmark" item-end></ion-icon>
    </button> 
  </ion-list>

标签: angularionic-frameworkionic2

解决方案


    // implementes css for ion-icon
ion-icon{
   position: absolute or fixed;
   width: 10px;
   right: 10px;
}

have to make css the fixed icon, with the size of the better than what you have to submit


推荐阅读