Files
PhotonVision/chameleon-client/src/router.js

28 lines
491 B
JavaScript
Raw Normal View History

2019-09-20 09:59:16 +03:00
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router);
2019-09-20 09:59:16 +03:00
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({
2019-10-20 10:13:07 +03:00
// mode: 'history',
2019-09-20 09:59:16 +03:00
base: process.env.BASE_URL,
routes: [
{
path: '/',
redirect:'/vision'
2019-09-20 20:56:24 +03:00
},
{
path: '/vision',
2019-09-20 20:56:24 +03:00
name: 'Vision',
2019-10-02 23:37:35 +03:00
component: lazyLoad('Camera')
2019-09-20 09:59:16 +03:00
},
{
path: '/settings',
2019-09-20 20:56:24 +03:00
name: 'Settings',
2019-10-02 23:37:35 +03:00
component: lazyLoad('Settings')
},
2019-09-20 09:59:16 +03:00
]
})