Vue routerネーミングビューネーミングルーティング
998 ワード
名前付きルーティング
名前付きビュー
名前付きビュー
const routes = [
{
path: '/',
name: 'index',
//
redirect: 'goods',
//
alias: '*'
},
{
path: '/goods',
name: 'GoodsList',
components: {
default: GoodsList,
title: Title,
image: Images
},
beforeEnter: (to, from, next) => {
next()
}
},
{
path: '/cart/:cartId',
name: 'cart',
components: {
default: Cart,
image: Images
}
}
]