————————2019/1/29 更新————————html
—————————穷———穷——————————app
tabBar: { backgroundColor: '#fff', borderStyle: 'white', color: '#333', selectedColor: '#333', list: [ { pagePath: 'pages/index', text: '活动首页', iconPath: 'resource/images/home.png', selectedIconPath: 'resource/images/home-active.png' }, { pagePath: 'pages/my', text: '个人', iconPath: 'resource/images/my.png', selectedIconPath: 'resource/images/my-active.png' } ] }
诞生了这个,图标尺寸81*81,不支持svg跟字体图标。ide
设计师看了想砍人系列svg
不配置原生tabbar,采用了navigateTo跟navagateBack字体
【图片如侵删】
虽然达到了自定义样式的效果,可是有两个缺点:只是单纯的导航,失去tab效果;超过两个tab就难了。动画
配置原生tabbar,也编写自定义tabbar,以下:spa
自定义tabbar使用wx.switchTab切换,但onLoad时使用wx.hideTabBar()隐藏掉原生款。bingo!
如今既继承了原生tab的效果,又能够使用字体图标跟svg,还能够加些有温度的小玩意。设计
mark一个小问题:同时使用wx.showToast跟下拉刷新wx.startPullDownRefresh会致使下拉刷新的三点动画异常,-_-||还觉得是被我俩个tabbar撑到了。code