1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div id="app">
- <router-view></router-view>
- <div class="tab-bar" v-if="!$route.meta.hideTabBar">
- <TabBar></TabBar>
- </div>
- </div>
- </template>
- <script>
- import TabBar from '@/components/TabBar.vue'
- export default {
- name: 'App',
- components: {
- TabBar
- },
- computed: {
- showTabBar() {
- const hideTabBarRoutes = ['/login', '/register', '/profile/detail']
- return !hideTabBarRoutes.includes(this.$route.path)
- }
- }
- }
- </script>
- <style>
- html {
- font-size: 16px;
- height: 100%;
- }
- body {
- margin: 0;
- padding: 0;
- font-size: 16px;
- -webkit-text-size-adjust: 100%;
- height: 100%;
- }
- h1{
- margin: 0;
- padding: 0;
- }
- #app {
- font-family: Arial, sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- color: #2c3e50;
- height: 100%;
- /* padding-bottom: 50px; */
- min-height: 100vh;
- position: relative;
- }
- .tab-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- z-index: 100;
- }
- </style>
|