uni-app入门-实战教程-二十四-page.json配置

配置官网详细说明、
https://uniapp.dcloud.io/collocation/pages?id=pages

image.png
image.png
image.png

导航搜索栏属性、


image.png
{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/index/index",
            "style": {
                //"navigationBarTitleText": "uni-app"
                "app-plus":{
                    "scrollIndicator":"none",//隐藏滚动条
                    //标题样式
                    "titleNView":{
                        //搜索框配置
                        "searchInput":{
                            "align":"center",
                            "backgroundColor":"#F7F7F7",
                            "borderRadius":"4px",
                            "placeholder":"提示信息",
                            //提示信息的颜色
                            "placeholderColor":"#CCCCCC",
                            //是否禁止输入
                            "disabled":true
                        },
                    //配置按钮
                    "buttons":[
                        //左边
                        {
                            "color":"#FF9619",
                            //按钮按下的颜色
                            "colorPressed":"#BBBBBB",
                            "float":"left",
                            "fontSize":"22px",
                            "fontSrc":"/static/font/icon.ttf",
                            "text": "\ue603"
                        },
                        //右边
                        {
                            "color":"#000000",
                            "colorPressed":"#BBBBBB",
                            "float":"right",
                            "fontSize":"22px",
                            "fontSrc":"/static/font/icon.ttf",
                            "text": "\ue672"
                        }
                    ]
                    }
                }
            }
        }
        ,{
            "path" : "pages/news/news",
            "style" : {}
        }
        ,{
            "path" : "pages/paper/paper",
            "style" : {}
        }
        ,{
            "path" : "pages/home/home",
            "style" : {}
        }
    ],
    
    /* 全局样式 */
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "love-magicjuren",
        "navigationBarBackgroundColor": "#ffffff",
        "backgroundColor": "#ffffff"
    },
    /* 导航栏 */
    "tabBar":{
        "color":"#8a8a8a",
        "selectedColor":"#333333",
        "list":[
            {
            "pagePath":"pages/index/index",
            "iconPath":"static/tabBar/index.png",
            "selectedIconPath":"static/tabBar/indexcd.png",
            "text":"首页"
        },
        {
            "pagePath":"pages/news/news",
            "iconPath":"static/tabBar/news.png",
            "selectedIconPath":"static/tabBar/newscd.png",
            "text":"资讯"
        },
        {
            "pagePath":"pages/paper/paper",
            "iconPath":"static/tabBar/page.png",
            "selectedIconPath":"static/tabBar/pagecd.png",
            "text":"聊天"
        },
        {
            "pagePath":"pages/home/home",
            "iconPath":"static/tabBar/me.png",
            "selectedIconPath":"static/tabBar/mecd.png",
            "text":"我的"
        }
        ]
    }
    
}

你可能感兴趣的:(uni-app入门-实战教程-二十四-page.json配置)