| 1234567891011121314151617181920212223242526272829 |
- <template>
- <div id="app" :style="{ backgroundImage: `url(${backgroundImg})` }">
- <Nav />
- <router-view />
- </div>
- </template>
- <script setup lang="ts">
- import { computed } from 'vue';
- import { useRoute } from 'vue-router';
- import Nav from '@/components/Nav.vue';
- const route = useRoute();
- const backgroundImg = computed(() => {
- return route.path === '/home' ? '/src/assets/images/home/home-bg@1X.png' : '';
- });
- </script>
- <style scoped lang="scss">
- #app {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- background-position: center center;
- background-repeat: no-repeat;
- background-size: cover;
- }
- </style>
|