(1) Set the tabBar:
uni.setTabberItem({});
wx.setTabberItem({});
index | number | is | Which item of the tabBar, counting from the left, is indexed from 0. |
text | string | no | Button text on tab |
iconPath | string | no | Image Path |
selectedIconPath | string | no | Image path when selected |
pagePath | string | no | Page absolute path |
visible | boolean | no | tab Whether to display |
uni.setTabBarItem({
index: 0,
text: 'text',
iconPath: '/path/to/iconPath',
selectedIconPath: '/path/to/selectedIconPath',
pagePath: 'pages/home/home'
})
wx.setTabBarItem({
index: 0,
text: 'text',
iconPath: '/path/to/iconPath',
selectedIconPath: '/path/to/selectedIconPath',
pagePath: 'pages/home/home'
})
(2) Show tabBar:
uni.showTabber();
wx.showTabber();
(3) Hide tabBar:
uni.hideTabber();
wx.hideTabber();