【问题标题】:change the position of the ion-refresher改变离子清新剂的位置
【发布时间】:2018-10-16 13:13:07
【问题描述】:

我正在尝试反转ion-refresher 的方向,但切换位置似乎不像在Ion-Infinite-Scroll 上那样工作

<ion-refresher [position]="isReverse ? 'bottom' : 'top'" pullingIcon="arrow-dropdown"  pullingText="Pull to refresh"
  refreshingSpinner="circles"  refreshingText="Refreshing..." (ionRefresh)="refresh($event)">
</ion-refresher>
<ion-infinite-scroll *ngIf="!isPagingComplete" (ionInfinite)="doInfinite($event)" [position]="isReverse ? 'bottom' : 'top'">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>
<div *ngIf="isNotSliding">
  <template *ngFor="let entity of entityList" [ngTemplateOutlet]="template" [ngOutletContext]="{entity: entity}">
  </template>    
</div>
<div *ngIf="!isNotSliding">
  <ion-item-sliding class="page-list-sliding-item" *ngFor="let entity of entityList" #item>
    <ion-item class="page-list-inner-item" (click)="config.onItemClick(entity)" >
      <template [ngTemplateOutlet]="template" [ngOutletContext]="{entity: entity}"></template>
    </ion-item>
    <ion-item-options side="right">
      <button ion-button color="danger"  *ngIf="config && config.canDelete" (click)="delete(entity.id)">
        <ion-icon name="trash"></ion-icon>Delete
      </button>
      <button ion-button color="dark" >
        <ion-icon name="more"></ion-icon>More
      </button>
    </ion-item-options>
  </ion-item-sliding>
</div>

如何在Ion-Refresher 上反转滚动?

【问题讨论】:

    标签: javascript html angular typescript ionic-framework


    【解决方案1】:

    ion-refresher 组件是一个非常特别的组件。 它将始终放置在最近的ion-content 组件的顶部。

    没有默认选项或配置可以使反向ion-refresher 成为可能。

    【讨论】:

    • 很有趣,所以没有已知的方法可以反转拉动的方向
    • 我希望我们可以覆盖父容器而不是直接进入 ion-app
    猜你喜欢
    • 2020-05-07
    • 2018-12-15
    • 1970-01-01
    • 2016-03-17
    • 2021-01-05
    • 1970-01-01
    • 2018-03-16
    • 1970-01-01
    • 2019-08-12
    相关资源
    最近更新 更多