-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.vue
More file actions
37 lines (34 loc) · 967 Bytes
/
App.vue
File metadata and controls
37 lines (34 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
<v-app>
<v-main>
<AppBar />
<router-view v-slot="{ Component, route }">
<v-slide-x-transition mode="out-in">
<div>
<div v-if="!route.meta.dynamicViewName" class="ma-1" :class="smAndDown ? 'text-h6' : 'text-h5'">
{{ route.meta.viewName }}
</div>
<component :is="Component" />
</div>
</v-slide-x-transition>
</router-view>
<SnackBar />
</v-main>
</v-app>
</template>
<script setup>
import { onErrorCaptured } from 'vue';
import AppBar from '@/components/AppBar.vue';
import SnackBar from '@/components/SnackBar.vue';
import { useSnacksStore } from '@/stores/snacks';
import { useDisplay } from 'vuetify'
const snacksStore = useSnacksStore();
const { smAndDown } = useDisplay();
onErrorCaptured((error) => {
snacksStore.addSnack({
text: 'Unhandled Error: ' + error.message,
type: 'error',
ltr: true,
});
});
</script>