2019-09-20 09:59:16 +03:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import Router from 'vue-router'
|
|
|
|
|
Vue.use(Router)
|
|
|
|
|
|
2019-10-02 23:37:35 +03:00
|
|
|
function lazyLoad(view){
|
|
|
|
|
return() => import(`@/views/${view}.vue`)
|
|
|
|
|
}
|
2019-09-20 09:59:16 +03:00
|
|
|
export default new Router({
|
|
|
|
|
mode: 'history',
|
|
|
|
|
base: process.env.BASE_URL,
|
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
2019-09-20 20:56:24 +03:00
|
|
|
redirect:'/Vision'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/Vision',
|
|
|
|
|
name: 'Vision',
|
2019-10-02 23:37:35 +03:00
|
|
|
component: lazyLoad('Camera')
|
2019-09-20 09:59:16 +03:00
|
|
|
},
|
|
|
|
|
{
|
2019-09-20 20:56:24 +03:00
|
|
|
path: '/Settings',
|
|
|
|
|
name: 'Settings',
|
2019-10-02 23:37:35 +03:00
|
|
|
component: lazyLoad('Settings')
|
2019-09-20 09:59:16 +03:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
})
|