中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

ionic 手勢事件

事件 描述 用法 實例
on-hold 長按的時間是500毫秒。
<button 
????on-hold="onHold()" 
????class="button">
????Test
????</button>
運行代碼 ?
on-tap 這個是手勢輕擊事件,如果長按時間超過250毫秒,那就不是輕擊了。。
<button 
????on-tap="onTap()" 
????class="button">
????Test
????</button>
運行代碼 ?
on-double-tap 手雙擊屏幕事件
<button 
????on-double-tap="onDoubleTap()" 
????class="button">
????Test
????</button>
運行代碼 ?
on-touch 這個和 on-tap 還是有區(qū)別的,這個是立即執(zhí)行,而且是用戶點擊立馬執(zhí)行。不用等待 touchend/mouseup 。
????<button on-touch="onTouch()" 
????class="button">
????Test
????</button>
運行代碼 ?
on-release 當用戶結束觸摸事件時觸發(fā)。
<button 
????on-release="onRelease()" 
????class="button">
????Test
</button>
運行代碼 ?
on-drag 這個有點類似于PC端的拖拽。當你一直點擊某個物體,并且手開始移動,都會觸發(fā) on-drag。
<button 
????on-drag="onDrag()" 
????class="button">
????Test
</button>
運行代碼 ?
on-drag-up 向上拖拽。
<button 
????on-drag-up="onDragUp()" 
????class="button">
????Test
</button>
運行代碼 ?
on-drag-right 向右拖拽。
<button 
????on-drag-right="onDragRight()" 
????class="button">
????Test
</button>
運行代碼 ?
on-drag-down 向下拖拽。
<button 
????on-drag-down="onDragDown()" 
????class="button">
????Test
</button>
運行代碼 ?
on-drag-left 向左邊拖拽。
<button 
????on-drag-left="onDragLeft()" 
????class="button">
????Test
</button>
運行代碼 ?
on-swipe 指手指滑動效果,可以是任何方向上的。而且也和 on-drag 類似,都有四個方向上單獨的事件。
<button 
????on-swipe="onSwipe()" 
????class="button">
????Test
</button>
運行代碼 ?
on-swipe-up 向上的手指滑動效果。
<button 
????on-swipe-up="onSwipeUp()" 
????class="button">
????Test
</button>
運行代碼 ?
on-swipe-right 向右的手指滑動效果。
<button 
????on-swipe-right="onSwipeRight()" 
????class="button">
????Test
</button>
運行代碼 ?
on-swipe-down 向下的手指滑動效果。
<button
????on-swipe-down="onSwipeDown()"
????class="button">
????Test
</button>
運行代碼 ?
on-swipe-left 向左的手指滑動效果。
<button 
????on-swipe-left="onSwipeLeft()"
????class="button">
????Test
</button>
運行代碼 ?

$ionicGesture

一個angular服務展示ionicionic.EventController手勢。

方法

on(eventType, callback, $element)

在一個元素上添加一個事件監(jiān)聽器。

參數 類型 詳情
eventType string

監(jiān)聽的手勢事件。

callback function(e)

當手勢事件發(fā)生時觸發(fā)的事件。

$element element

angular元素監(jiān)聽的事件。

options object

對象。

off(eventType, callback, $element)

在一個元素上移除一個手勢事件監(jiān)聽器。

參數 類型 詳情
eventType string

移除監(jiān)聽的手勢事件。

callback function(e)

移除監(jiān)聽器。

$element element

被監(jiān)聽事件的angular元素。