PhotoSwipe长按事件,即不取消手机浏览器的长按事件,以达到弹出识别二维码、保存菜单

时间:2022-11-17 08:45:43

PhotoSwipe的options参数说明


isClickableElement function

Default value:

isClickableElement: function(el) {
    return el.tagName === 'A';
}

Function should check if the element (el) is clickable. If it is – PhotoSwipe will not callpreventDefault and click event will pass through. Function should be as light is possible, as it's executed multiple times on drag start and drag release.


如下设置即可

// define options (if needed)
var options = {
isClickableElement : function(el){
return true;
}
};