Simple exported class
import axios from 'axios'
export class Connection {
ConnectToLaser (url) {
return axios.get('http://172.16.10.227/')
// return axios.get(url)
}
test () {
return 'hello'
}
}
export default Connection
// to use
import Connection from '@/utils/Connection' // import
let connection = new Connection() // define
connection.test // use