Refact: Reoganise components and router

This commit is contained in:
Bertrand Benjamin 2018-11-30 15:47:13 +01:00
parent 0bb3572ec7
commit c06b834580
6 changed files with 8 additions and 51 deletions

View File

@ -7,10 +7,8 @@
</b-navbar-brand>
<b-collapse is-nav id="nav_collapse">
<b-navbar-nav>
<b-nav-item :to="{ name: 'analysis' }">Analyse</b-nav-item>
<b-nav-item :to="{ name: 'import' }">Import</b-nav-item>
<b-nav-item :to="{ name: 'postes' }">Postes</b-nav-item>
<b-navbar-nav class="ml-auto">
<b-nav-item :to="{ name: 'config' }">Config</b-nav-item>
</b-navbar-nav>
</b-collapse>

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import Router from 'vue-router'
import home from './views/Home.vue'
import home from './views/home.vue'
Vue.use(Router)
@ -12,28 +12,12 @@ export default new Router({
component: home
},
{
path: '/analysis',
name: 'analysis',
path: '/config',
name: 'config',
// route level code-splitting
// this generates a separate chunk (import.[hash].js) for this route
// this generates a separate chunk (config.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "import" */ './views/analysis.vue')
},
{
path: '/import',
name: 'import',
// route level code-splitting
// this generates a separate chunk (import.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "import" */ './views/import.vue')
},
{
path: '/postes',
name: 'postes',
// route level code-splitting
// this generates a separate chunk (postes.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "postes" */ './views/postes.vue')
component: () => import(/* webpackChunkName: "config" */ './views/config.vue')
}
]
})

View File

@ -1,20 +0,0 @@
<template>
<div class="home">
<h1>Comptes </h1>
</div>
</template>
<script>
// @ is an alias to /src
export default {
name: 'home',
components: {
},
data () {
return {
}
},
computed: {
}
}
</script>

View File

@ -20,7 +20,7 @@
import { mapGetters } from 'vuex'
export default {
name: 'analysis',
name: 'home',
components: {
},
data () {

View File

@ -1,5 +0,0 @@
<template>
<div class="import">
<h1>Import</h1>
</div>
</template>