[Vuejs]-Need help to export Vue SFC that import Swiper.js

0👍

Solved this problem myself by moving the object instantiation inside the mounted property.

export default {
    name: "Employees",
    mounted: function() {
        let mySwiper = new Swiper('.swiper-container', {
            direction: "horizontal",
            loop: false,
            spaceBetween: 50,
            effect: "slide"
        })
    }
}

Leave a comment