Build base structure

pull/9/head
johnniang 2019-03-19 16:43:49 +08:00
parent 5b533ec221
commit ff6ea659a8
20 changed files with 181 additions and 16 deletions

View File

@ -1,9 +1,5 @@
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view />
</div>
</template>

View File

@ -1,6 +1,7 @@
import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";
import Layout from "./views/layout/Layout";
import DashBoard from "./views/dashboard/Dashboard";
Vue.use(Router);
@ -8,17 +9,20 @@ export default new Router({
routes: [
{
path: "/",
name: "home",
component: Home
},
{
path: "/about",
name: "about",
// route level code-splitting
// 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")
name: "layout",
component: Layout,
children: [
{
path: "dashboard",
name: "dashboard",
component: DashBoard
},
{
path: "posts",
name: "posts-list",
component: () => import("./views/post/PostList")
}
]
}
]
});

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,9 @@
<template>
<div>Dashboard</div>
</template>
<script>
export default {};
</script>
<style scoped></style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,24 @@
<template>
<div>
<div class="nav">
Nav
<ul>
<li>
<router-link :to="{ name: 'dashboard' }">Dashboard</router-link>
</li>
<li>
<router-link :to="{ name: 'posts-list' }">Posts</router-link>
</li>
</ul>
</div>
<div class="container">
<router-view />
</div>
</div>
</template>
<script>
export default {};
</script>
<style scoped></style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,11 @@
<template>
<div>
Page list
</div>
</template>
<script>
export default {};
</script>
<style scoped></style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,9 @@
<template>
<div>Post list</div>
</template>
<script>
export default {};
</script>
<style scoped></style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,8 @@
<template> </template>
<script>
export default {};
</script>
<style scoped>
</style>