收藏
回答

进入页面 input自动获取焦点打开键盘 然后右上角返回箭头 返回上一页,键盘实际未关闭 如何处理?

hideKeyboard 实际未关闭键盘 从首页跳转至搜索页面   键盘弹起  直接点击右上角返回  底部的tabbar无法点击了
搜索页面代码  点击返回  回到首页page/home/index/index
onUnload(){

        var that = this
        wx.hideKeyboard({
            complete(res) {
                console.log('hideKeyboard res', res)
                that.setData({
                    focus: false,
                    isHistory: false,
                    historyData: []
                })
            }
        })
    },
app.json的底部导航
"tabBar": {
    "color""#cccccc",
    "selectedColor""#3B96F4",
    "borderStyle""black",
    "list": [
      {
        "pagePath""page/home/index/index",
        "text""专家库",
        "iconPath""res/nav/home.png",
        "selectedIconPath""res/nav/home_sel.png"
      },
      {
        "pagePath""page/user/index/index",
        "text""我的",
        "iconPath""res/nav/user.png",
        "selectedIconPath""res/nav/user_sel.png"
      }
    ]
  },
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容