• Uniapp usingComponents 和自定义导航用法


    {
        "pages": [{
            "path": "pages/main/main",
            "style": {
                "navigationStyle": "custom",
                "transparentTitle": "auto",
                "titlePenetrate": "YES",
                "navigationBarBackgroundColor": "#0067FF",
                "navigationBarTextStyle": "white",
                "navigationBarTitleText": "",
                "usingComponents": {
                    "home-page": "/pages/main/tabs/home/home",
                    "client-page": "/pages/main/tabs/business/business",
                    "me-page": "/pages/main/tabs/me/me"
                }
            }
        }, {
            "path": "pages/main/tabs/home/home",
            "style": {
                "usingComponents": {
                    "cb-page": "/pages/main/tabs/home/cb/cb"
                }
            }
        }, {
            "path": "pages/main/tabs/business/business"
        }, {
            "path": "pages/main/tabs/me/me"
        }, {
            "path": "pages/login/login",
            "style": {
                "navigationBarTitleText": "登录"
            }
        }, {
            "path": "pages/main/tabs/home/cb/cb"
        }],
        "globalStyle": {
            "navigationBarTextStyle": "black",
            "navigationBarTitleText": "标题",
            "navigationBarBackgroundColor": "#F8F8F8",
            "backgroundColor": "#F8F8F8",
            "app-plus": {
                "background": "#efeff4"
            }
        },
        "condition" : { //模式配置,仅开发期间生效
            "current": 0, //当前激活的模式(list 的索引项)
            "list": [
                {
                    "name": "", //模式名称
                    "path": "", //启动页面,必选
                    "query": "" //启动参数,在页面的onLoad函数里面得到
                }
            ]
        }
    }
    一、  "navigationStyle": "custom",   //为自定义导航
    二、usingComponents ,若引用地址为非 components 目录组件下的,则在 pages.json 需要注册,如:
    {
            "path": "pages/main/tabs/home/cb/cb"
        }

    否则会提示报找不到 地址

  • 相关阅读:
    HDU 1564 Play a game(巴什博弈)
    威佐夫博弈(Wythoff Game)
    产生冠军 hdoj_2094 巧用set
    find your present (感叹一下位运算的神奇)
    快速排序
    深度优先搜索(DFS)
    hdoj 2075 A|B?
    基础练习 特殊回文数
    10.Nginx Rewrite重写
    07.Nginx七层负载均衡
  • 原文地址:https://www.cnblogs.com/Fooo/p/16668996.html
Copyright © 2020-2023  润新知