-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.vue
46 lines (41 loc) · 928 Bytes
/
error.vue
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
38
39
40
41
42
43
44
45
46
<template>
<div>
<NuxtLayout>
<div class="error-layout">
<icon color="#f44336" :path="mdiStickerAlertOutline"/>
<h2>{{ error.statusCode }}</h2>
<p>{{ error.statusMessage }}</p>
<btn class="with-bg--primary hover--dim" @click="useRouter().go(-1)">« 后退</btn>
</div>
</NuxtLayout>
</div>
</template>
<script lang="ts" setup>
import type { NuxtError } from "#app";
import {mdiAlertOutline, mdiArrowLeft, mdiStickerAlertOutline} from "@mdi/js";
const props = defineProps({
error: Object as () => NuxtError
})
</script>
<style lang="css" scoped>
.error-layout {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 720px;
> svg {
width: 100px;
height: 100px;
margin-bottom: 32px;
}
h2 {
font-size: 52px;
margin: 0;
}
p {
margin: 24px 0;
font-size: 20px;
}
}
</style>