//长按的几个事件
@touchstart.native="gtouchstart(file)"
@touchmove.native="gtouchmove()"
@touchend.native="showDeleteButton(file)"
//手机上操作才可以看见下载
download(href, name) {
debugger
let eleLink = document.createElement("a");
eleLink.download = name;
eleLink.href = href;
eleLink.click();
eleLink.remove();
},
//长按事件(起始)
gtouchstart(item) {
var self = this;
this.timeOutEvent = setTimeout(function() {
self.longPress(item);
}, 500); //这里设置定时器,定义长按500毫秒触发长按事件
return false;
},
//手释放,如果在500毫秒内就释放,则取消长按事件,