{
path: 'formList',//路径
name: '表单',
props:{id:5},//参数
meta: {
il8n: 'detail'
},
component: () => import('@/views/form/form')//引入相印的组件
}
在组件用props接受该参数
路由下Router.d.ts文件
export interface RouteRecord {
path: string
regex: RegExp
components: Dictionary<Component>
instances: Dictionary<Vue>
name?: string
parent?: RouteRecord
redirect?: RedirectOption
matchAs?: string
meta: any
beforeEnter?: (
route: Route,
redirect: (location: RawLocation) => void,
next: () => void
) => any
props: //参数类型
| boolean
| Object
| RoutePropsFunction
| Dictionary<boolean | Object | RoutePropsFunction>
}