包含底部導(dǎo)航部分和單頁導(dǎo)航
Vue.use(Router)
export default new Router({
mode: 'history',
base: '/store-order/',
routes: [
{
path: '/',
redirect: '/mainpage'
},
{
path: '/mainpage',
component: MainPage,
name: 'MainPage',
redirect: '/mainpage/home',
children: [
{
path: '/mainpage/home',
// name: 'home-animation',當(dāng)有子child的時(shí)候不需要配置name參數(shù)
component: PageTransition,
children: [
{
path: '/',
name: 'Home',
component: Home
},
{
// 添加圖片
path: '/mainpage/home/addPicture',
component: AddPicture
},
{
// 主數(shù)據(jù)維護(hù)
path: '/mainpage/home/dataMaintenance',
component: DataMaintenance
},
{
// 主數(shù)據(jù)編輯
path: '/mainpage/home/dataEdit',
component: DataEdit
},
{
// 商品分類
path: '/mainpage/home/goodsCategory',
component: GoodsCategory
},
{
path: '/mainpage/home/myorder',
component: MyOrder,
name: 'MyOrder'
}
]
},
{path: '/mainpage/cart', name: 'Cart', component: Cart},
{path: '/mainpage/mine', name: 'Mine', component: Mine}
]
}
]
})