参考网址:https://blog.csdn.net/yinge0508/article/details/98100240

pages.json中配置app-plus:searchInput

"pages": [
        {
            "path": "pages/index/index",
            "style": {
                "navigationBarBackgroundColor": "#00c170",
                "app-plus": {
                    "bounce": "none",
                    "titleNView": {
                        "buttons": [ 
                            {
                                "text": "搜索", 
                                "fontSize":"16",
                                "float": "right",
                                "color":"#fff"
                            },
                        ],
                        "searchInput":{
                                "align": "center",
                                "placeholder": "请输入查找房源信息",
                                "borderRadius":"50upx",
                                "backgroundColor": "#fff"
                            }
                    }
                }
            }
        }
    ]

监听输入框和按钮事件

在需要监听的页面写

onNavigationBarButtonTap(val) {
    console.log("val")
},
onNavigationBarSearchInputChanged (val) {
     console.log("val")
}    

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2022-01-12
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-08
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案