// Генерируем событие, возможно с передаваемыми данными
this.$emit('название' [, данные]);
// Слушаем событие
this.$on('название', function(данные) {...});
<template>
<div>
<li v-bind:class="{ active: isActive }" @click="setActive(false)"></li>
<li v-bind:class="{ active: isActive }" @click="setActive(false)"></li>
<li v-bind:class="{ active: isActive }" @click="setActive(false)"></li>
<li v-bind:class="{ active: isActive }" @click="setActive(false)"></li>
</div>
</template>
<script>
...
setActive: function(active){
this.isActive = active;
}
</script>
var theInterval = null;
$(this.$el).find('.jplus-setting-vue').mousedown(function() {
if(theInterval === null){
theInterval = setInterval(function() {
vm.crowdfunding.goal =
(parseFloat(vm.crowdfunding.goal) ?parseFloat(vm.crowdfunding.goal):0) + addVelocity;
counter++;
if (addVelocity < 25) {
addVelocity++;
}
}, 400);
}
});
$(this.$el).find('.jplus-setting-vue').mouseup(function() {
window.clearInterval(theInterval);
if (counter === 0) {
vm.crowdfunding.goal++; // it was just click
}
counter = 0;
addVelocity = 1;
theInterval = null;
});
var data-coef = $(".c-bets__bet ").attr('data-coef');