App.vue 846 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div id="app">
  3. <router-view></router-view>
  4. <TabBar v-if="showTabBar"></TabBar>
  5. </div>
  6. </template>
  7. <script>
  8. import TabBar from '@/components/TabBar.vue'
  9. export default {
  10. name: 'App',
  11. components: {
  12. TabBar
  13. },
  14. computed: {
  15. showTabBar() {
  16. // Hide TabBar on login, register and profile detail pages
  17. const hideTabBarRoutes = ['/login', '/register', '/profile/detail']
  18. return !hideTabBarRoutes.includes(this.$route.path)
  19. }
  20. }
  21. }
  22. </script>
  23. <style>
  24. html {
  25. font-size: 16px;
  26. height: 100%;
  27. }
  28. body {
  29. margin: 0;
  30. padding: 0;
  31. font-size: 16px;
  32. -webkit-text-size-adjust: 100%;
  33. height: 100%;
  34. }
  35. #app {
  36. font-family: Arial, sans-serif;
  37. -webkit-font-smoothing: antialiased;
  38. -moz-osx-font-smoothing: grayscale;
  39. color: #2c3e50;
  40. height: 100%;
  41. /* padding-bottom: 50px; */
  42. }
  43. </style>