tabbar.js 503 B

1234567891011121314151617
  1. const tabBar = {
  2. async setNavigationBarTitle(barTitle, currentRoute) {
  3. if (Object.keys(barTitle).length > 0) {
  4. for (let i = 0, len = barTitle.length; i < len; i++) {
  5. if(currentRoute.includes(barTitle[i].value)) {
  6. uni.setNavigationBarTitle({
  7. title: barTitle[i].new_name,
  8. });
  9. return barTitle[i].new_name;
  10. }
  11. }
  12. }
  13. }
  14. };
  15. export default tabBar;