我有这样的vuejs路由器设置:
routes: [
{
path: '/catalog/category::category?/brand::brand?/size::size?/color::color?',
name: 'catalog',
component: Catalog
}
],
哪个参数使params成为可选的最终结果网址,例如:
/catalog/category:/brand:apple/size:/color:red
但是在这种情况下,我只想显示非空的参数。因此,在这种情况下:
/catalog/brand:apple/color:red