【问题标题】:Ionic 4 Refresher Not Working?Ionic 4 Refresher 不工作?
【发布时间】:2018-08-08 09:26:02
【问题描述】:

我正在尝试为我的应用实现拉动刷新功能,但ion-refresher 似乎不起作用。会不会是bug?

这是我的 HTML 组件:

<ion-content>
        <ion-refresher slot="fixed" (ionRefresh)="logSomethingToConsole()">
                <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="circles" refreshingText="Refreshing...">
                </ion-refresher-content>
        </ion-refresher>

      <ion-row justify-content-center text-center id="temp-text">
          <h1> Some Text </h1>
      </ion-row>

</ion-content>

【问题讨论】:

  • 剂量在控制台有什么错误吗?
  • 不,任何地方都没有错误。

标签: pull-to-refresh ionic4


【解决方案1】:

doRefresh(event) 函数没有被调用。

您必须在 ion-refresher 组件中设置属性[disabled]="false"。

见:https://github.com/ionic-team/ionic/issues/14992

【讨论】:

  • 仅供参考,根据 Github 链接,这个[disabled]=false 已被修补。因此,如果离子清新剂不起作用,则问题是由其他原因引起的。
猜你喜欢
  • 1970-01-01
  • 2017-12-22
  • 2020-06-21
  • 2021-04-27
  • 2020-11-18
  • 2019-06-03
  • 2020-04-21
  • 2021-04-20
  • 2020-07-14
相关资源
最近更新 更多