Creating class in a .vue


#1

Hi,

I’ve a file.js which is working and I’m trying to make a VueJS app, so I’m trying to use mixins to make his old js working on VueJS.

In this file I have some classes (Object classes and not CSS classes).
My question is, how do I declare my classes in my File.vue and where can I make my
let map = new leafletMap() ?

Thanks for your help :slight_smile:


#2

Is leafletMap your own custom created class or it’s some library class?


#3

It’s a own custom created class.


#4

Most probably in mounted() lifecycle hook


#5

Depends on if your constructor needs external data or not.