You need to sign in or sign up before continuing.
提交 082b7b96 编写于 作者: L lin-xin

Update router

上级 8edc10be
<template>
<div id="app">
<div class="wrapper">
<v-head></v-head>
<v-sidebar></v-sidebar>
<div class="content">
<transition name="move" mode="out-in"><router-view></router-view></transition>
</div>
</div>
<router-view></router-view>
</div>
</template>
<script>
import header from './components/common/header.vue';
import sidebar from './components/common/sidebar.vue';
export default {
components:{
'vHead':header,
'vSidebar':sidebar
}
}
</script>
<style>
@import "../static/css/main.css";
</style>
\ No newline at end of file
<template>
<div class="wrapper">
<v-head></v-head>
<v-sidebar></v-sidebar>
<div class="content">
<transition name="move" mode="out-in"><router-view></router-view></transition>
</div>
</div>
</template>
<script>
import vHead from './Header.vue';
import vSidebar from './Sidebar.vue';
export default {
components:{
vHead, vSidebar
}
}
</script>
......@@ -6,36 +6,42 @@ Vue.use(Router);
export default new Router({
routes: [
{
path: '/basetable',
component: resolve => require(['../components/page/BaseTable.vue'], resolve)
path: '/admin',
component: resolve => require(['../components/common/Home.vue'], resolve),
children:[
{
path: '/basetable',
component: resolve => require(['../components/page/BaseTable.vue'], resolve)
},
{
path: '/vuetable',
component: resolve => require(['../components/page/VueTable.vue'], resolve)
},
{
path: '/baseform',
component: resolve => require(['../components/page/BaseForm.vue'], resolve)
},
{
path: '/vueeditor',
component: resolve => require(['../components/page/VueEditor.vue'], resolve)
},
{
path: '/markdown',
component: resolve => require(['../components/page/Markdown.vue'], resolve)
},
{
path: '/upload',
component: resolve => require(['../components/page/Upload.vue'], resolve)
},
{
path: '/basecharts',
component: resolve => require(['../components/page/BaseCharts.vue'], resolve)
},
{
path: '/mixcharts',
component: resolve => require(['../components/page/MixCharts.vue'], resolve)
}
]
},
{
path: '/vuetable',
component: resolve => require(['../components/page/VueTable.vue'], resolve)
},
{
path: '/baseform',
component: resolve => require(['../components/page/BaseForm.vue'], resolve)
},
{
path: '/vueeditor',
component: resolve => require(['../components/page/VueEditor.vue'], resolve)
},
{
path: '/markdown',
component: resolve => require(['../components/page/Markdown.vue'], resolve)
},
{
path: '/upload',
component: resolve => require(['../components/page/Upload.vue'], resolve)
},
{
path: '/basecharts',
component: resolve => require(['../components/page/BaseCharts.vue'], resolve)
},
{
path: '/mixcharts',
component: resolve => require(['../components/page/MixCharts.vue'], resolve)
}
]
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册