uni-app学习记录01-pages配置项

{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "首页"
            }
        }
        // 用来配置路由
        ,{
            // path是单页的路径
            "path" : "pages/shouye/shouye",
            // style用于设置每个页面的状态栏、导航条、标题、窗口背景色等。
            "style" : {
                "navigationBarTitleText": "订单"
            }
        }
        ,{
            "path" : "pages/shezhi/shezhi",
            "style" : {
                "navigationBarTitleText": "设置"
            }
        }
    ],
    // tabBar用来设置底部导航栏 最少2栏最多5栏 
    "tabBar": {
        "color": "#f0f0f0",
        "selectedColor": "#3cc51f",
        "borderStyle": "black",
        "backgroundColor": "#ffffff",
        "list": [{
            // 设置底部导航栏的路径
            "pagePath": "pages/index/index",
            // 设置底部导航栏的名字
            "text": "首页",
            // 设置未选中时显示图标
            "iconPath":"static/icon_ck8ejdbukbf/shouye.png",
            // 设置选中时显示的图标
            "selectedIconPath":"static/icon_yboweg9a00s/shouye.png"
        }, {
            "pagePath": "pages/shouye/shouye",            
            "text": "订单",
            "iconPath":"static/icon_ck8ejdbukbf/dingdan.png",
            "selectedIconPath":"static/icon_yboweg9a00s/shouji.png"
        }, {
            "pagePath": "pages/shezhi/shezhi",
            "text": "设置",
            "iconPath":"static/icon_ck8ejdbukbf/shezhi.png",
            "selectedIconPath":"static/icon_yboweg9a00s/shezhi.png"
        }]
    },
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "uni-app",
        "navigationBarBackgroundColor": "#F8F8F8",
        "backgroundColor": "#F8F8F8"
    }
}

猜你喜欢

转载自www.cnblogs.com/wanguofeng/p/11717552.html
今日推荐