Answer the question
In order to leave comments, you need to log in
How to bind the sending of a POST request to the dblckick event in Vue.js?
Code for my double click handler. At the same moment, I want the data about elem.fileName to be sent to the server and processed there
methods:{
clickOnRow: function(event, elem){
this.clicks++
if(this.clicks === 1) {
var self = this
this.timer = setTimeout(function() {
console.log("одинарный");
self.clicks = 0
}, this.delay);
} else{
clearTimeout(this.timer);
console.log("двойной");
console.log(elem.fileName);
this.currentElem = elem.fileName;
this.$emit('current-elem',this.elem.fileName);
this.clicks = 0;
}
}
}
}
Answer the question
In order to leave comments, you need to log in
HTML:
<div id="page-preloader">
<div class="spinner"></div>
</div>
$(window).load(function() {
$(".spinner").fadeOut("fast");
$("#page-preloader").slideUp("slow");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question