I found out how to solve it:
data () {
return {
draggableItem: []
}
},
methods: {
loadList(){
setTimeout(() => {
//gsap.registerPlugin(Draggable, InertiaPlugin);
this.draggableItem = Draggable.create('#wrapper__drag', {
type:'x',
bounds: '.drag__inner-wrapper',
autoScroll: 1,
inertia: true
});
}, 1000);
}
},
mounted () {
gsap.registerPlugin(Draggable, InertiaPlugin);
this.$root.$on ('myEvent', () => {
setTimeout(() => {
this.loadList()
}, 1500);
});
},
beforeDestroy() {
this.draggableItem[0].kill();
}
Hope this can help someone