vue-router的index.js文件配置参数

RouteConfig 的类型定义:

interface RouteConfig = {
  path: string,
  component?: Component,
  name?: string, // 命名路由
  components?: { [name: string]: Component }, // 命名视图组件
  redirect?: string | Location | Function,
  props?: boolean | Object | Function,
  alias?: string | Array,
  children?: Array, // 嵌套路由
  beforeEnter?: (to: Route, from: Route, next: Function) => void,
  meta?: any,

  // 2.6.0+
  caseSensitive?: boolean, // 匹配规则是否大小写敏感?(默认值:false)
  pathToRegexpOptions?: Object // 编译正则的选项
}

参数具体作用见官方文档
https://router.vuejs.org/zh/api/#base

你可能感兴趣的:(Vue2.x,vue3,vue,前端)