ionic v.3中显示2个重新排序符号

时间:2018-10-25 14:52:02

标签: angular ionic-framework ionic3

我实现了与删除滑动条选项一起对列表重新排序的功能,但是我在其中显示了2个重新排序符号,如下所示 in the image it can be shown that there are two reorder symbols that must be single

这是我为此编写的功能:

  reorderItems(indexes){
let element = this.allSites[indexes.from];
this.allSites.splice(indexes.from, 1);
this.allSites.splice(indexes.to, 0, element);

}

这些是我在html文件中所做的更改:

<ion-list sitesList>
  <ion-item-group reorder = "true" (ionItemReorder)="reorderItems($event)" >
    <ion-item *ngFor="let site of allSites">
  <site-item radio-group
  [actives]="site.active" [siteItem]="site"
  [activeSite]="selectedSiteName"
  (onSiteInfoClick) = "siteInfo(site)"
  (onDashboardClick) = "openDashboard(site)"
  (onAlarmClick)="openAlarms(site)"
  (onDeleteSite)="delete(site)"
  (onActiveClick)="stateChange(site)">
  </site-item>
    </ion-item>
  </ion-item-group>
</ion-list>

0 个答案:

没有答案