update
This commit is contained in:
parent
207aa3a081
commit
9f6889a103
6 changed files with 67 additions and 37 deletions
29
src/App.vue
29
src/App.vue
|
@ -1,32 +1,5 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
</div>
|
||||
<div>
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
#nav {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
#nav a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
#nav a.router-link-exact-active {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
|
|
17
src/layouts/Admin.vue
Normal file
17
src/layouts/Admin.vue
Normal file
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>Admin Layout</h1>
|
||||
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
17
src/layouts/Organization.vue
Normal file
17
src/layouts/Organization.vue
Normal file
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>Organization Layout</h1>
|
||||
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -17,6 +17,19 @@ const routes: Array<RouteConfig> = [
|
|||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
},
|
||||
|
||||
{
|
||||
path: '/admin',
|
||||
name: 'AdminLayout',
|
||||
component: () => import(/* webpackChunkName: "adminLayout" */ '../layouts/Admin.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'OrganizationList',
|
||||
component: () => import(/* webpackChunkName: "organizationList" */ '../views/Admin/OrganizationList.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
|
13
src/views/Admin/OrganizationList.vue
Normal file
13
src/views/Admin/OrganizationList.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<div>
|
||||
OrganizationList
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
mounted () {
|
||||
console.log('dzqsd')
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,18 +1,15 @@
|
|||
<template>
|
||||
<div class="home">
|
||||
<img alt="Vue logo" src="../assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<h2>Vous êtes :</h2>
|
||||
<ul>
|
||||
<li><a href="">Une association</a></li>
|
||||
<li><a href="">Administrateur de l'Espace Condorcet Centre Social</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
name: 'Home'
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue