更新时间:2023-10-29 10:36:58
vue-router 动态路由是用了 path-to-regexp,所以可以在路径上写正则表达式
简单写下
routes: [
{
path: '/product/(2[3-9]|30)',
component: 23-30.vue
},
{
path: 'product/3[1-9]|[4-9][0-9]|100',
component: 31-100.vue
}
]