-
微信7.0.7版本起,当用户打开的小程序最底层页面是非首页时,默认展示“返回首页”按钮,开发者可在页面 onShow 中调用 hideHomeButton 进行隐藏。
-
动态改变下拉刷新的背景色:(针对IOS的下拉刷新和弹性上拉问题)
json: "backgroundColor": "#F00" onShow: wx.setBackgroundColor({ backgroundColorTop: '#ffffff', // 顶部窗口的背景色为白色 backgroundColorBottom: '#ffffff', // 底部窗口的背景色为白色 }) (根据实际情况判断是否需要添加定时器)
-
动态设置 tabBar 的整体样式
wx.setTabBarStyle({ color: '#FF0000', selectedColor: '#00FF00', backgroundColor: '#0000FF', borderStyle: 'white' })
-
动态设置 tabBar 某一项的内容,2.7.0 起图片支持临时文件和网络文件。
wx.setTabBarItem({ index: 0, text: 'text', iconPath: '/path/to/iconPath', selectedIconPath: '/path/to/selectedIconPath' })