路由规则方面
如果两个页面写在同一个组件中,比如说添加和修改,在配置路由规则时,需要将完整路径的放在前面,而使用动态路由的则放在后面,优先获取,先获取到前面的后面的就不再匹配
{
//菜单列表
path:'/menu',
component:()=>import('../components/view/menu/index')
},{
//添加菜单
path:'/menu/add',
component:()=>import('../components/view/menu/info')
},{
//修改菜单
path:'/menu/:id',
component:()=>import('../components/view/menu/info')
}`