App.vue 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. h1{
  36. margin: 0;
  37. padding: 0;
  38. }
  39. #app {
  40. font-family: Arial, sans-serif;
  41. -webkit-font-smoothing: antialiased;
  42. -moz-osx-font-smoothing: grayscale;
  43. color: #2c3e50;
  44. height: 100%;
  45. }
  46. </style>