[Vuejs]-Vue JS: owl carousel item.index unable to update data

0πŸ‘

βœ…

it seems the usage of this
the outside this is not equal the inside this
you can resolve it by arrow function

 $(".owl-carousel").on('changed.owl.carousel', e => {}

or you can save a variable

endScenario: function() {
  const self = this;
  $(".owl-carousel").on('changed.owl.carousel', function(e){
     //use self replace this
  });
}

Leave a comment