uniapp and applet set tabBar and show and hide tabBar

Time:2023-12-19

(1) Set the tabBar:

uni.setTabberItem({});
wx.setTabberItem({});
indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.
textstringnoButton text on tab
iconPathstringnoImage Path
selectedIconPathstringnoImage path when selected
pagePathstringnoPage absolute path
visiblebooleannotab 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();

Recommended Today

Resolved the Java. SQL. SQLNonTransientConnectionException: Could not create connection to the database server abnormal correctly solved

Resolved Java. SQL. SQLNonTransientConnectionException: Could not create connection to the database server abnormal correct solution, kiss measuring effective!!!!!! Article Catalog report an error problemSolutionscureexchanges report an error problem java.sql.SQLNonTransientConnectionException:Could not create connection to database server Solutions The error “java.sql.SQLNonTransientConnectionException:Could not create connection to database server” is usually caused by an inability to connect to the […]