【问题标题】:Ionic 3 - Pan EventsIonic 3 - 泛事件
【发布时间】:2018-03-06 22:58:59
【问题描述】:

我在 Ionic 3 中找不到任何有关 Pan 事件的文档,或者它们是否来自 Cordova 或 Angular 4?

<div class="swipper" #swipper (panleft)="swipe( $event)" (panright)="swipe( $event)" (panend)="swipe( $event) " (panup)="swipe( $event) " (pandown)="swipe( $event) ">

panup 和 pandown 事件不会一直被触发,而且通常非常棘手甚至有问题(在 Chrome 和 iOS 模拟器中测试)。因此,作为一种解决方案,我正在考虑使用 touchstart touchend 事件,这需要重写,但首先我想了解更多关于 pan 事件的信息。

【问题讨论】:

    标签: angular cordova typescript ionic3


    【解决方案1】:

    它就在那里。在这里你可以看到the doc

    可以通过绑定到点击、按下、 平移、滑动、旋转和捏合事件。

    来自official code base的示例:

    <ion-card (pan)="panEvent($event)">
    <ion-item>
      Panned: {{pan}} times
    </ion-item>
    

    【讨论】:

    • 尽管如此,他们并没有提到 panleft/panright/panend 例如
    猜你喜欢
    • 2018-11-04
    • 1970-01-01
    • 2019-05-03
    • 1970-01-01
    • 1970-01-01
    • 2018-01-13
    • 2019-07-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多