其他分享
首页 > 其他分享> > 配置uni-app导航栏上的搜索框

配置uni-app导航栏上的搜索框

作者:互联网

page下的style选项根据官方文档配置即可

https://uniapp.dcloud.io/collocation/pages?id=pages

 

例子:

{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/index/index",
            "style": {
                 "app-plus":{
                     "titleNView":{
                         "searchInput":{
                             "align":"center",
                             "backgroundColor":"#eee",
                             "borderRadius":"5px", // 只能用px作单位
                             "placeholder":"请输入内容",
                             "placeholderColor":"#ccc"
                         }
                     }
                 }
            }
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "uni-app",
        "navigationBarBackgroundColor": "#F8F8F8",
        "backgroundColor": "#F8F8F8"
    }
}

 

效果:

 

标签:index,style,栏上,app,io,uni,F8F8F8,pages
来源: https://www.cnblogs.com/luguankun/p/11517871.html