📅  最后修改于: 2020-10-25 03:01:37             🧑  作者: Mango
点击保持事件用于在持续并完成触摸事件后触发(启用),因此仅被称为点击保持事件。 Tab Hold是一个内置的Fast Clicks库。
以下参数默认情况下用于禁用或启用和配置-
S.No | Parameter & Description | Type | Default |
---|---|---|---|
1 |
tapHold To enable tap hold events when it is set to true. |
boolean | false |
2 |
tapHoldDelay It specifies the duration of holding the tap before triggering taphold event on the target element. |
number | 750 |
3 |
tapHoldPreventClicks The tap hold event will not be fired after clicking the event. |
boolean | true |
以下代码用于启用点击保持事件-
var myApp = new Framework7 ({
tapHold: true //enable tap hold events
});
var $$ = Dom7;
$$('.some-link').on('taphold', function () {
myApp.alert('Tap hold fired!');
});