File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
src/runtime/components/app Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 3
3
const nuxtifyConfig = useNuxtifyConfig ()
4
4
const dialog = useDialog ()
5
5
const toast = useToast ()
6
+ const errorMessage = useErrorMessage ()
6
7
7
8
// Page info
8
9
useNuxtifySiteTitle ()
@@ -11,6 +12,9 @@ useServerSeoMeta({
11
12
description: ` This is the ${nuxtifyConfig .brand ?.name } playground. ` ,
12
13
})
13
14
15
+ // Component state
16
+ errorMessage .value = ' This is an error message.'
17
+
14
18
// Functions
15
19
const clickDialog = () => {
16
20
// Dialog
@@ -106,6 +110,16 @@ const clickToast = () => {
106
110
</v-col >
107
111
</v-row >
108
112
113
+ <!-- App error -->
114
+ <v-row >
115
+ <v-col cols =" 12" >
116
+ <v-card class =" pa-4" >
117
+ <h2 >AppError</h2 >
118
+ <AppError />
119
+ </v-card >
120
+ </v-col >
121
+ </v-row >
122
+
109
123
<!-- App logo override -->
110
124
<v-row >
111
125
<v-col cols =" 12" >
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import { useErrorMessage } from ' #imports'
3
+
4
+ const errorMessage = useErrorMessage ()
5
+ const isDev = import .meta .dev
6
+ </script >
7
+
8
+ <template >
9
+ <v-alert
10
+ v-if =" errorMessage"
11
+ type =" error"
12
+ density =" compact"
13
+ variant =" text"
14
+ :icon =" false"
15
+ class =" text-body-2 pa-0"
16
+ >
17
+ {{ errorMessage }}
18
+
19
+ <!-- DEBUG -->
20
+ <div
21
+ v-if =" isDev"
22
+ class =" mt-2"
23
+ >
24
+ <h2 class =" text-h6 text-black" >
25
+ Debug
26
+ </h2 >
27
+ <pre >{{ errorMessage }}</pre >
28
+ </div >
29
+ </v-alert >
30
+ </template >
You can’t perform that action at this time.
0 commit comments