zoukankan      html  css  js  c++  java
  • vue-router 参数

    export default new Router({
        mode: 'history'//路由模式,取值为history与hash
        base'/'//打包路径,默认为/,可以修改
        routes: [
        {
            path: string//路径
            component: Component; //页面组件
            name: string// 命名路由-路由名称
            components: ( ComponentName | ()=>import('页面地址') ); // 命名视图组件
            redirect: string | Location | Function; // 重定向
            props: boolean | string | Function; // 路由组件传递参数
            alias: string | Array<string>; // 路由别名
            children: Array<RouteConfig>; // 嵌套子路由
            beforeEnter?: (to: Route, from: Route, next: Function) => void// 路由单独钩子
            meta: any; // 自定义标签属性,比如:是否需要登录
            icon: any; // 图标
            // 2.6.0+
            caseSensitive: boolean; // 匹配规则是否大小写敏感?(默认值:false)
            pathToRegexpOptions: Object; // 编译正则的选项
        }
        ]})
    $route:路由信息对象,只读对象;
    $router:路由操作对象 ,只写对象。
  • 相关阅读:
    MongoDB初探-基本语句和数据结构
    Restful API学习Day5
    Restful API学习Day4
    毕业设计记录1
    解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题
    java调用python代码
    mysql使用唯一索引避免插入重复数据
    阅读笔记16
    阅读笔记15
    阅读笔记14
  • 原文地址:https://www.cnblogs.com/maxiag/p/14812470.html
Copyright © 2011-2022 走看看